-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trading shouldNotReachHere() for an abstract method #9312
Conversation
@@ -90,7 +90,8 @@ Object invokeWithWarnings( | |||
Warning[] extracted = warnings.getWarnings(warning, null, false); | |||
return WithWarnings.wrap(EnsoContext.get(this), result, extracted); | |||
} catch (UnsupportedMessageException e) { | |||
throw CompilerDirectives.shouldNotReachHere(e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UnsupportedMessageException
may happen. We are calling to unknown implementation, unknown language and we cannot assume how it is implemented. As such it is safer to not panic on JVM level but propagate such state as a regular Enso interpreter panic.
eb5a030 does that for whole engine/runtime
project.
engine/runtime/src/main/java/org/enso/interpreter/node/callable/InvokeMethodNode.java
Show resolved
Hide resolved
Jaroslav Tulach reports a new STANDUP for yesterday (2024-03-07): Progress: - PR to eliminate
Next Day: 50% of work
|
Pull Request Description
Avoiding
shouldNotReachHere()
in favor of less fatal exceptions/constructs.Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Java,
style guides.