HubSpot / jinjava

Jinja template engine for Java
Apache License 2.0
690 stars 168 forks source link

Add InvalidInput error when ArithmeticException is thrown when resolving expression #1190

Closed manheychiu closed 3 months ago

manheychiu commented 3 months ago

Currently, when an ArithmeticException is thrown when resolving expression, we are adding a TemplateError with ErrorReason.EXCEPTION to the interpreter.

Since ArithmeticException is caused by users' input errors, this PR changes to add a TemplateError with ErrorReason.INVALID_INPUT when ArithmeticException is caught.