Skip to content

Instantly share code, notes, and snippets.

@oheidemann
Created October 27, 2015 09:47
Show Gist options
  • Save oheidemann/0d0e805e631c4889f0e2 to your computer and use it in GitHub Desktop.
Save oheidemann/0d0e805e631c4889f0e2 to your computer and use it in GitHub Desktop.
ExceptionInInitializerError is Fatal
import scala.util.Try
object ABC {throw new RuntimeException}
try {
Try {ABC}.recover {case x => println("I caught it: " + x)}
} catch {
case y: Throwable => println("Now, i caught it: " + y)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment