2.12. Exceptions
Scala exceptions work the same way as in Java or C++. When you throw an exception, for example
throw new IllegalArgumentException("x should not be negative")
You are currently reading a PREVIEW of this book.
Get instant access to over
$1 million worth of books and videos.
Start a Free Trial