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: 61811
Status: resolved
Priority: 0/
Queue: Exception-Class

People
Owner: Nobody in particular
Requestors: icestar [...] inbox.ru
Cc:
AdminCc:

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



Subject: Default values for extra Exception fields
Hello! Quite often I run into a need to have the default values for the extra Exception fields. For example, for my Web application I have such base exception: 'MyApp::Exception' => { description => "Base MyApp exception.", fields => 'status', } And I'd like to set HTTP_INTERNAL_SERVER_ERROR value by default for 'status' field for all generated exceptions. This is just one simple example. What do you think about adding this feature?
At this point, I'm kind of reluctant to do this without rewriting class generation to use Mouse or Moose. I have a branch for this that I need to look at again.
I'm going to close. The way to do this with modern Perl is simply to use Throwable.