Allow custom exceptions to be handled