[dancer-users] Capturing an exception thrown in the routes? on_route_exception

Gabor Szabo gabor at szabgab.com
Mon Oct 28 20:46:42 GMT 2013


is there a way in Dancer2 to provide a generic handler for exceptions
in any route?

I added a

hook on_route_exception => sub {
  my ($context, $error) = @_;

but it is unclear to me what can I do there.

I tried to call redirect and forward in that hook
but it disregarded both and I still got the exception in the browser.


More information about the dancer-users mailing list