Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- val x = {
- val x = read() // Return Either[Exception, String]
- if (x.isLeft) {
- foo(x.left.get) // foo expects a Exception, and will exit(1) once its done.
- }
- x.right.get // We need x to be of type String since it is used later on
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement