EO::Error - A generic base class for Exceptions
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 }
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.
exception
Arthur Bergman & James Duncan arbergman@fotango.com jduncan@fotango.com
Copyright 2004 Fotango Ltd. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl(1).
To install EO, copy and paste the appropriate command in to your terminal.
cpanm
cpanm EO
CPAN shell
perl -MCPAN -e shell install EO
For more information on module installation, please visit the detailed CPAN module installation guide.