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

Re^3: Exception::Class - how to use?

by Perllace (Acolyte)
on Apr 21, 2011 at 13:48 UTC ( #900614=note: print w/replies, xml ) Need Help??

in reply to Re^2: Exception::Class - how to use?
in thread Exception::Class - how to use?

Yes Corion..was in fix to get this done and... i didn't notice that the thread was 5 years old.. cud finally figure out how to do this ...
use Exception::Class ( 'MyExceptions::Test' => { fields => [qw{message}], } ); use Moose::Util::TypeConstraints; class_type 'MyExceptions::ExecutionTest'; no Moose::Util::TypeConstraints; 1;
then to throw the exception
MyExceptions::ExceptionTest->throw( message => $data )
then the script has something like
if ( my $ex = $@ ) { my $e; if ( $e = Exception::Class->caught('MyExceptions::ExecutionTest')) { print $e->message; } }
Thanks for your help

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://900614]
[LanX]: # Pestis Africana Suum
[erix]: that's an old plan, I think. Isn't there already a danewal (or some such name)?
[marto]: Build with -Wall
[erix]: Danewerk
[LanX]: I seem to remember that the danewall was build by the Frankish empire against the Danes
[erix]: 500 AD thru viking age
[erix]: that would make sense but wikipedia thinks otherwise
[LanX]: oh me was wrong ...
[erix]: but it always works both ways of course
[LanX]: Funny some weeks ago, I met people from the Cimbrian peninsula who didn't know it's called the Cimbrian peninsula ...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (9)
As of 2018-03-22 18:42 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (283 votes). Check out past polls.