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 0028b64..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;
 
@@ -19,13 +18,9 @@ use namespace::clean -except => 'meta';
 
 Catalyst::Controller::WrapCGI - Run CGIs in Catalyst
 
-=head1 VERSION
-
-Version 0.027
-
 =cut
 
-our $VERSION = '0.027';
+our $VERSION = '0.029';
 
 =head1 SYNOPSIS
 
@@ -238,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;