Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import scala.util.{Success, Failure}
- t1 match {
- case Success(string) => string
- case Failure(t) => "Got a throwable: " + t.getMessage
- }
- // String = hello
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement