Eidolon::Core::Exception - base exception class for Eidolon.
General exception usage example:
eval { # ... throw CoreError::Compile("Oops!"); # ... }; if ($@) { my $e = $@; if ($e eq "CoreError::Compile") { print $e; # prints "Oops!" } else { $e->rethrow; } }
The Eidolon::Core::Exception class is a base class for all core, driver and application exceptions. It contains various methods that can be useful for exception handling. This package is a rework of CPAN Exception package.
Class constructor. Creates an exception object and calls class initialization function. Don't raise exceptions using this method, use throw() instead.
throw()
Throws exception. Actually, creates an Eidolon::Core::Exception object and dies.
Rethrows the exception (if it was thrown before).
Overloaded equality comparsion operator (==). Checks if exception is the instance of $class specified.
$class
Overloaded stringify operation. Returns exception message.
Eidolon, Eidolon::Core::Exception::Builder, Eidolon::Core::Exceptions
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Anton Belousov, <abel@cpan.org>
Copyright (c) 2009, Atma 7, http://www.atma7.com
To install Eidolon, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Eidolon
CPAN shell
perl -MCPAN -e shell install Eidolon
For more information on module installation, please visit the detailed CPAN module installation guide.