Skip to content
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

Replace usage of scala.util.control.NonFatal #349

Closed
alexandru opened this issue Apr 19, 2017 · 0 comments
Closed

Replace usage of scala.util.control.NonFatal #349

alexandru opened this issue Apr 19, 2017 · 0 comments
Assignees
Milestone

Comments

@alexandru
Copy link
Member

alexandru commented Apr 19, 2017

Scala's NonFatal implementation allows for certain problematic exceptions to fall through, like ControlThrowable or InterruptedException.

Not catching such exceptions ends up interfering with resource handling. We need a NonFatal implementation that only catches VirtualMachineError. These errors are:

  • InternalError
  • OutOfMemoryError
  • StackOverflowError

This is because our aim is to not catch errors that should definitely crash the virtual machine, but for the others we need the declared finalizers to run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant