| Eidolon documentation | view source | Contained in the Eidolon distribution. |
Eidolon::Core::Exception::Builder - exception builder for Eidolon.
In one of your application files, for example lib/Example/Exceptions.pm
you can write:
use Eidolon::Core::Exception::Builder
(
"MyException" =>
{
"title" => "Something happened."
},
"MyException::Terrible" =>
{
"isa" => "MyException",
"title" => "Something terrble happened."
},
"MyException::Good" =>
{
"isa" => "MyException",
"title" => "Something good happened."
}
);
The Eidolon::Core::Exception::Builder class provides an easy way to create own exceptions. It has no methods that you should call - all work is done during package import.
Creates exception $class with $data settings. $data is a hashref,
containing inheritance information and exception message:
Exception base class.
Exception message.
If no isa information is specified, Eidolon::Core::Exception will be used as a base exception class.
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
| Eidolon documentation | view source | Contained in the Eidolon distribution. |