Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Exception-Class CPAN distribution.

Report information
The Basics
Id: 66333
Status: resolved
Priority: 0/
Queue: Exception-Class

People
Owner: Nobody in particular
Requestors: ROUS [...] Sourcery.Org
Cc: kcoar [...] redhat.com
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.32
Fixed in: (no value)



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'.