Exceptions

Exceptions offer the possibility to avoid cluttering program code with exception handling. An exception can be thrown when something unexpected happens. The exception is then caught, either by an invoking method, or by the default exception handler which prints a call stack.