CC: | kcoar [...] redhat.com |
Subject: | 'error' value from exception declaration is lost |
I would like to define a 'default' message for exceptions, which will be
used unless the new/throw method call supplies a replacement. I got the
impression from *some*where (although I can't find it now, of course),
that this was implied by specifying a value for 'error' in the exception
definition:
use Exception::Class
(
'MyException' => {
description => 'Exceptions specific to me',
error => 'default message'
}
);
MyException->throw;
=> 'default message'
This may be organically related to issue
https://rt.cpan.org/Public/Bug/Display.html?id=37254 since being able to
define a default value for custom fields would allow a 'full_message'
method to be defined that used them absent an explicit value in 'error'.