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

Re^2: Creating exception classes

by perlbaski (Sexton)
on Feb 05, 2013 at 18:48 UTC ( #1017251=note: print w/ replies, xml ) Need Help??

in reply to Re: Creating exception classes
in thread Creating exception classes

Thanks, that worked..I was thinking classes are blessed hashes, so I was trying to access them that way, looks like Exception::Class module creates accessors to access the fields. Am I correct?

Comment on Re^2: Creating exception classes
Replies are listed 'Best First'.
Re^3: Creating exception classes
by Athanasius (Canon) on Feb 06, 2013 at 06:40 UTC

    From the source code it appears that Exception::Class inherits from Exception::Class::Base. The documentation for Exception::Class::Base catalogues a number of class and/or object methods, among which are these:

    Returns the description for the given Exception::Class::Base subclass. ... This is also an object method.

    Returns the error/message associated with the exception.

    So these accessors are, as it were, “built-in” to any class derived from Exception::Class.

    Hope that helps,

    Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2015-10-07 20:30 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (200 votes), past polls