Skip to content

Commit

Permalink
Don't swallow ArityException when -ea
Browse files Browse the repository at this point in the history
  • Loading branch information
JaroslavTulach committed Jan 26, 2024
1 parent c01085a commit 0e01b29
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@ private Object doDispatch(
var result = invokeNode.execute(symbolFn, frame, state, new Object[] {selfAsThat, that});
return result;
} catch (ArityException ex) {
var assertsOn = false;
assert assertsOn = true;
if (assertsOn) {
throw new AssertionError("Unexpected arity exception", ex);
}
return null;
} catch (PanicException ex) {
if (ctx.getBuiltins().error().isNoSuchConversionError(ex.getPayload())) {
Expand Down

0 comments on commit 0e01b29

Please sign in to comment.