Home » Scala Exception Handling

Scala Exception Handling

by Online Tutorials Library

Scala Exception Handling

Exception handling is a mechanism which is used to handle abnormal conditions. You can also avoid termination of your program unexpectedly.

Scala makes “checked vs unchecked” very simple. It doesn’t have checked exceptions. All exceptions are unchecked in Scala, even SQLException and IOException.


Scala Program Example without Exception Handling

Output:

java.lang.ArithmeticException: / by zero  
Next TopicScala Try Catch

You may also like