updated CHANGES, removed debug code left by accident, added a bit of POD regarding...
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Exception.pm
index 83e0255..34d709e 100644 (file)
@@ -49,8 +49,8 @@ L<Carp::Clan/croak>.
 sub throw {
     my ($class, $msg, $stacktrace) = @_;
 
-    # Don't re-encapsulate multiple times
-    die $msg if blessed($msg) && $msg->isa('DBIx::Class::Exception');
+    # Don't re-encapsulate exception objects of any kind
+    die $msg if blessed($msg);
 
     # use Carp::Clan's croak if we're not stack tracing
     if(!$stacktrace) {
@@ -68,6 +68,17 @@ sub throw {
     die $self;
 }
 
+=head2 rethrow
+
+This method provides some syntactic sugar in order to
+re-throw exceptions.
+
+=cut
+
+sub rethrow {
+    die shift;
+}
+
 =head1 AUTHORS
 
 Brandon L. Black <blblack@gmail.com>