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

People
Owner: Nobody in particular
Requestors: rhomel.chinsio [...] gmail.com
Cc:
AdminCc:

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



Subject: predefined propagate or rethrow function
Hi, It would be convenient if there was a predefined propagate/rethrow function like this: if ( my $e = Exception::Class->caught('SomeException') ) { # handle exception } else { Exception::Class->Rethrow(); } The code inside of propogate/rethrow function would be: $e = Exception::Class->caught(); ref $e ? $e->rethrow : die $e; Which is equivalent to the example in the synopsis of the documentation. Obviously if $@ was just a string then the die call would originate from the function but it is already off in my opinion by this point regardless of the convenience function.