Commit 655d310
Add InvalidInput error when ArithmeticException is thrown when resolving expression (#1190)
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.
Co-authored-by: Manhey Chiu <mchiu@hubspot.com>1 parent 8ff186e commit 655d310
2 files changed
Lines changed: 25 additions & 0 deletions
File tree
- src
- main/java/com/hubspot/jinjava/el
- test/java/com/hubspot/jinjava/el
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
191 | 205 | | |
192 | 206 | | |
193 | 207 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
664 | 664 | | |
665 | 665 | | |
666 | 666 | | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
667 | 678 | | |
668 | 679 | | |
669 | 680 | | |
| |||
0 commit comments