minor doc fix to sync with code
[dbsrgits/DBIx-Class-Historic.git] / lib / DBIx / Class / Exception.pm
index cfa7887..0580202 100644 (file)
@@ -31,13 +31,11 @@ $DBix::Class::Exception::DBIC_EXCEPTION_CLASS
 
 =head1 METHODS
 
-=over 4
+=head2 throw( $message )
 
-=item throw( $message )
+=head2 throw( message => $message )
 
-=item throw( message => $message )
-
-=item throw( error => $error )
+=head2 throw( error => $error )
 
 Throws a fatal exception.
 
@@ -49,13 +47,11 @@ sub throw {
 
     my $message = $params{message} || $params{error} || $! || '';
 
-    local $Carp::CarpLevel = 1;
+    local $Carp::CarpLevel = (caller(1) eq 'NEXT' ? 2 : 1);
 
     Carp::croak($message);
 }
 
-=back
-
 =head1 AUTHOR
 
 Marcus Ramberg <mramberg@cpan.org>