good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Error handling in Mojoliciousby davido (Cardinal) |
on Jul 08, 2021 at 16:58 UTC ( [id://11134804]=note: print w/replies, xml ) | Need Help?? |
I hadn't considered subclassing this before, but you can create exception classes based on Mojo::Exception, which ships with Mojolicious. As is often the case with Mojolicious POD, the documentation is pretty good if you know where to look for it. It seems like a really convenient approach is to use raise to spawn exception classes on demand rather than explicitly subclassing Mojo::Exception. The POD shows how to do that. Dave
In Section
Seekers of Perl Wisdom
|
|