if the CGI throws exception objects, better to propagate them rather than force them...
Robert Buels [Wed, 4 Aug 2010 17:09:18 +0000 (10:09 -0700)]
lib/Catalyst/Controller/CGIBin.pm
lib/Catalyst/Controller/WrapCGI.pm

index 06e6de7..2c76c99 100644 (file)
@@ -6,7 +6,6 @@ use mro 'c3';
 extends 'Catalyst::Controller::WrapCGI';
 
 use File::Find::Rule ();
-use Catalyst::Exception ();
 use File::Spec::Functions qw/splitdir abs2rel/;
 use IPC::Open3;
 use Symbol 'gensym';
index f1de732..a2897a5 100644 (file)
@@ -9,7 +9,6 @@ extends 'Catalyst::Controller';
 use HTTP::Request::AsCGI ();
 use HTTP::Request ();
 use URI ();
-use Catalyst::Exception ();
 use URI::Escape;
 use HTTP::Request::Common;
 
@@ -234,9 +233,7 @@ sub wrap_cgi {
 
     select($old);
 
-    Catalyst::Exception->throw(
-        message => "CGI invocation failed: $saved_error"
-    ) if $saved_error;
+    die $saved_error if $saved_error;
   }
 
   return $env->response;