Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Error handling in Mojolicious

by davido (Cardinal)
on Jul 08, 2021 at 16:58 UTC ( [id://11134804]=note: print w/replies, xml ) Need Help??


in reply to Error handling in Mojolicious

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11134804]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2026-01-14 13:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (118 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.