Skip to content

Unwrap OutputTooBigException when wrapped in ELException#1086

Merged
jasmith-hs merged 2 commits intomasterfrom
output-too-big-error
Jun 26, 2023
Merged

Unwrap OutputTooBigException when wrapped in ELException#1086
jasmith-hs merged 2 commits intomasterfrom
output-too-big-error

Conversation

@jasmith-hs
Copy link
Copy Markdown
Contributor

We can add a more specific error for OutputTooBigException here when it's thrown as the result of evaluating an ELExpression, such as calling a macro function with a very large output.

Comment on lines +248 to +260
} else if (e.getCause() != null && e.getCause() instanceof OutputTooBigException) {
interpreter.addError(
new TemplateError(
ErrorType.FATAL,
ErrorReason.OUTPUT_TOO_BIG,
ErrorItem.FUNCTION,
e.getCause().getMessage(),
null,
interpreter.getLineNumber(),
interpreter.getPosition(),
e
)
);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New case

Base automatically changed from count-big-decimal-as-primitive to master June 26, 2023 12:25
@jasmith-hs jasmith-hs merged commit ad68c0f into master Jun 26, 2023
@jasmith-hs jasmith-hs deleted the output-too-big-error branch June 26, 2023 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant