groovy

Configurable reaction to exceptions during template binding

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 1.1-beta-1
  • Fix Version/s: 1.1-rc-2
  • Component/s: groovy-jdk
  • Labels:
    None
  • Number of attachments :
    0

Description

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.

Activity

Hide
Paul King added a comment -

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.

Show
Paul King added a comment - 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.
Hide
Yegor Bryukhov added a comment -

I agree that propagation is more natural and expected. And may be consistency is more important than backward compatibility here.

Show
Yegor Bryukhov added a comment - I agree that propagation is more natural and expected. And may be consistency is more important than backward compatibility here.
Hide
Paul King added a comment -

Now behaves the same as XmlTE and GStringTE

Show
Paul King added a comment - Now behaves the same as XmlTE and GStringTE

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: