Don't stringify blessed errors in ->execute
Christian Hansen [Mon, 4 Apr 2005 15:17:49 +0000 (15:17 +0000)]
lib/Catalyst/Engine.pm

index ee6afcb..a095811 100644 (file)
@@ -205,8 +205,12 @@ sub execute {
         else { $c->state( &$code( $class, $c, @{ $c->req->args } ) ) }
     };
     if ( my $error = $@ ) {
-        chomp $error;
-        $error = qq/Caught exception "$error"/;
+
+        unless ( ref $error ) {
+            chomp $error;
+            $error = qq/Caught exception "$error"/;
+        }
+        
         $c->log->error($error);
         $c->error($error);
         $c->state(0);