Bugs item #1700375, was opened at 2007-04-13 17:12
Message generated for change (Comment added) made by orangeherbert
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=700930&aid=1700375&group_id=124910
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Matt Sgarlata (sgarlatm)
Assigned to: Nobody/Anonymous (nobody)
Summary: Improve error messages for nested transformations
Initial Comment:
When an error occurs during a deep copy of an object graph, the error messages are confusing. Here is an example:
net.sf.morph.transform.TransformationException: Error copying source [com.spider.cms.hdao.impl.PerformanceChartHDao@1, com.spider.cms.hdao.impl.PerformanceChartHDao@2, com.spider.cms.hdao.impl.PerformanceChartHDao@1] (class org.hibernate.collection.PersistentList) to destination [com.spider.cms.hdao.impl.PerformanceChartHDao@1, com.spider.cms.hdao.impl.PerformanceChartHDao@2, com.spider.cms.hdao.impl.PerformanceChartHDao@1] (class org.hibernate.collection.PersistentList) at net.sf.morph.transform.transformers.BaseTransformer.copy(BaseTransformer.java:402) at net.sf.morph.transform.transformers.SimpleDelegatingTransformer.copyImpl(SimpleDelegatingTransformer.java:245) at
It would be nice if we could spit out something better like "Error copying property some.nested.path where source was ___ and destination was ___" or perhaps "Error copying property 'path' of object at path 'some.nested' where source was __ and destination was ___"
Right now the error message looks like it could be something wrong with Morph when really that's not the case at all. The error messages need to give more context of where we are in the graph that the error is happening.
----------------------------------------------------------------------
>Comment By: Matt Benson (orangeherbert)
Date: 2008-06-12 13:18
Message:
Logged In: YES
user_id=120761
Originator: NO
I think the transformerName/reflectorName properties go a long way here,
since they show up in logging.
----------------------------------------------------------------------
Comment By: Matt Benson (orangeherbert)
Date: 2007-04-14 00:04
Message:
Logged In: YES
user_id=120761
Originator: NO
I think it would be nice in general to have a facility in Morph whereby
one could determine the current position in an object graph. I'm thinking
it might be fairly easy to do this with a ThreadLocal stack of property
names and have been kind of letting this idea cook for awhile to figure out
how to do this as non-invasively as possible, maybe by providing an aspect
to be applied to any NodeCopier (this would probably be very easy to
Spring-wire, for example). Maybe if this were available message-building
code could query some known threadlocal to learn whether the node-tracker
was in use, and augment the created messages accordingly.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=700930&aid=1700375&group_id=124910
|