[ https://issues.apache.org/jira/browse/VELOCITY-656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12655313#action_12655313 ]
Nathan Bubna commented on VELOCITY-656: --------------------------------------- If it won't bother you to leave this out of 1.6.1, that's great, i'm rather weary of rebuilding it. Dropping Hibernate objects in the context is always scary, but i can't deny having done it myself. I still think it's terribly wrong that toString() ever throws an exception. My feeling was that logging this was better than wrapping it, but it's more of a -0 feeling than a -1 feeling. Let's leave this for 1.7. And i'll probably just let you commit it once we get your account set up (hopefully not too much longer). > Wrap ref evaluate exception so vm location is revealed > ------------------------------------------------------ > > Key: VELOCITY-656 > URL: https://issues.apache.org/jira/browse/VELOCITY-656 > Project: Velocity > Issue Type: Improvement > Affects Versions: 1.6.1 > Reporter: Byron Foster > Attachments: 656.patch > > > The following VTL calls the toString() method on the object in $foo: > #if($foo)#end > If the toString() method throws an exception, the exception is thrown all the > way out of velocity without any indication of where the vtl reference > occurred. This patch wraps the exception with a VelocityException with a > message that indicates the location of the offending reference. > However, I wonder why toString() is called at all... the code tests for > toString() == null and returns false if so, and true otherwise in the above > example vtl. Why is this test necessary, and why isn't just a non-null > object enough for testing? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]