Register global error handler to capture errors into exceptions.
Add application error handler. Adding Application class to our App library code and deriving from it.