[Catalyst-commits] r10671 - Catalyst-Runtime/5.80/trunk/lib/Catalyst
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Fri Jun 26 15:27:20 GMT 2009
Author: rafl
Date: 2009-06-26 15:27:19 +0000 (Fri, 26 Jun 2009)
New Revision: 10671
Modified:
Catalyst-Runtime/5.80/trunk/lib/Catalyst/Exception.pm
Log:
Make Catalyst::Exception throw exception instances instead of plain strings.
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/Exception.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/Exception.pm 2009-06-26 15:27:05 UTC (rev 10670)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/Exception.pm 2009-06-26 15:27:19 UTC (rev 10671)
@@ -50,11 +50,12 @@
my $class = shift;
my %params = @_ == 1 ? ( error => $_[0] ) : @_;
- my $message = $params{message} || $params{error} || $! || '';
+ $params{message} = $params{message} || $params{error} || $! || '';
+ my $error = $class->new(%params);
local $Carp::CarpLevel = 1;
- croak($message);
+ croak($error);
}
=head2 meta
More information about the Catalyst-commits
mailing list