KES777 / mojo

Mojolicious - Perl real-time web framework
http://mojolicio.us
Artistic License 2.0
0 stars 0 forks source link

Give a chance for custome handler to handle exception #46

Open KES777 opened 6 years ago

KES777 commented 6 years ago

Summary

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:

  1. Exception may occur inside controler's action
  2. 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