Skip to content

Instantly share code, notes, and snippets.

@teivah
Created October 29, 2018 23:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save teivah/bafdceadce2c189b66417951ed33061e to your computer and use it in GitHub Desktop.
Save teivah/bafdceadce2c189b66417951ed33061e to your computer and use it in GitHub Desktop.
val tried: Try[Int] = Try(new FileReader("notes.md")).map(f => f.read())
tried match {
case Success(n) => println(s"Success: $n")
case Failure(e) => e.printStackTrace
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment