Add a rethrow method to Exception.
Florian Ragwitz [Fri, 26 Jun 2009 15:28:14 +0000 (15:28 +0000)]
lib/Catalyst/Exception.pm

index b5b5bc3..6956f0e 100644 (file)
@@ -57,7 +57,12 @@ sub throw {
 
     local $Carp::CarpLevel = 1;
 
-    croak($error);
+    croak $error;
+}
+
+sub rethrow {
+    my ($self) = @_;
+    croak $self;
 }
 
 =head2 meta