EO::Error - A generic base class for Exceptions


EO documentation  | view source Contained in the EO distribution.

Index


NAME

Top

EO::Error - A generic base class for Exceptions

SYNOPSIS

Top



   exception EO::Error::SomeError;
   exception EO::Error::SomeError::Whoo extends => 'EO::Error::SomeError';

   eval {
     throw EO::Error::SomeError text => 'some error has occurred';
   };

   if ($@) {
     $@->text
     $@->file
     $@->line
     $@->stacktrace
     print $@; # will stringify
   }

DESCRIPTION

Top

This is the base class for Exceptions inside the EO module tree. To declare an exception class simply use the exception declaration followed by the name of the exception you want to declare. In addition to a simple declaration you can use the extends example shown in the synopsis above. If you fail to catch a thrown exception your program will die with a strack trace from that point.

AUTHOR

Top

Arthur Bergman & James Duncan arbergman@fotango.com jduncan@fotango.com

COPYRIGHT

Top

SEE ALSO

Top

perl(1).


EO documentation  | view source Contained in the EO distribution.