Advertisement
Guest User

Untitled

a guest
Apr 19th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. import scala.util.{Success, Failure}
  2. t1 match {
  3. case Success(string) => string
  4. case Failure(t) => "Got a throwable: " + t.getMessage
  5. }
  6. // String = hello
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement