Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Using Tiny::try with exception class

by mbethke (Hermit)
on Oct 10, 2012 at 01:33 UTC ( #998107=note: print w/ replies, xml ) Need Help??


in reply to Using Tiny::try with exception class

The problem is that Exception::Class->caught() explicitly checks $@ for the exception object. The method doesn't do much anyway though, so with Try::Tiny you can simplify this to:

... catch { if(UNIVERSAL::isa($_,'MyException')) { warn $e->error, "\n"; ... } }


Comment on Re: Using Tiny::try with exception class
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (17)
As of 2015-07-31 13:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (278 votes), past polls