If we register custom renderer handler we also should give it a change to process exceptions
Currently Mojolicious just flushes handler if exception occur
Motivation
There are two cases where exception may occur:
Exception may occur inside controler's action
Exception may occur inside handler
For first case we should not clear handler. This will allow our handler to handle exception.
For second case we MUST clear handler because our handler did not done its job and we are required to fallback
Summary
If we register custom renderer handler we also should give it a change to process exceptions Currently Mojolicious just flushes
handler
if exception occurMotivation
There are two cases where exception may occur:
For first case we should not clear
handler
. This will allow our handler to handle exception. For second case we MUST clearhandler
because our handler did not done its job and we are required to fallback