if the CGI throws exception objects, better to propagate them rather than force them...
[catagits/Catalyst-Controller-WrapCGI.git] / lib / Catalyst / Controller / WrapCGI.pm
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;