As you can see you use "try" to denote a block of code where exceptions will be handled by the "catch" clause at
the end of the block. In "catch" you should implement whatever you need as your error handling policy. This leads
to cleaner code with only one point for error handling.

Defining your own exceptions

You can define custom exceptions to handle unexpected problems in your programs. You only need to extend the
Exception class implementing a constructor and the getMessage method.