KES777 / mojo

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

Can not provide exception.format.my_handler template #44

Open KES777 opened 6 years ago

KES777 commented 6 years ago

As I said before I can not provide template named exception.format.my_handler

Thus I try to workaround this. I hook into before_render and did as adviced in guide: https://mojolicious.org/perldoc/Mojolicious/Guides/Rendering#Rendering-exception-and-not_found-pages # Make sure we are rendering the exception template return unless my $template = $args->{template}; return unless $template eq 'exception'; MY CODE HERE But becuase of I have 'exception.development.html.ep' it take precedence and MY CODE never called. Because 'exception.development' tried first: https://metacpan.org/source/SRI/Mojolicious-7.81/lib/Mojolicious/Plugin/DefaultHelpers.pm#L119 maybe try finding the commit that originally introduced it and understanding what it was for before wasting other people's time try understanding why the tests that break when you remove it work that way