Issue Details (XML | Word | Printable)

Key: GROOVY-2186
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Paul King
Reporter: Yegor Bryukhov
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
groovy

Configurable reaction to exceptions during template binding

Created: 09/Oct/07 04:04 PM   Updated: 22/Nov/07 05:21 AM
Component/s: groovy-jdk
Affects Version/s: 1.1-beta-1
Fix Version/s: 1.1-rc-2

Time Tracking:
Not Specified


 Description  « Hide
SimpleTemplateEengine:
When an exception happens during application of a template to a binding (including but not limited to the case when the binding is incorrect), the result is just the name of the exception. One might prefer propagation of the exception instead of converting it to a string,
others may prefer to replace missing binding (if that's the case) with empty string ...
I suggest to make this behavior configurable.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Paul King added a comment - 13/Oct/07 10:42 PM
GString and Xml Template Engines both simply propogate the exception. I suspect that is what we always want to do. At least, we should have consistent behaviour across these.

Yegor Bryukhov added a comment - 13/Oct/07 10:54 PM
I agree that propagation is more natural and expected. And may be consistency is more important than backward compatibility here.

Paul King added a comment - 13/Oct/07 11:24 PM
Now behaves the same as XmlTE and GStringTE