X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Controller-WrapCGI.git;a=blobdiff_plain;f=lib%2FCatalyst%2FController%2FWrapCGI.pm;h=88ed2afea6900cb00ee40dbb1905773e0c1aed6a;hp=a2897a52b9c8efae9495d88aa7bc748d191cd3e9;hb=f451edec6cb723877985658c4dc25737e5671b17;hpb=49ad9853ee21e140d06393352ecb4f0d5cbc8410 diff --git a/lib/Catalyst/Controller/WrapCGI.pm b/lib/Catalyst/Controller/WrapCGI.pm index a2897a5..88ed2af 100644 --- a/lib/Catalyst/Controller/WrapCGI.pm +++ b/lib/Catalyst/Controller/WrapCGI.pm @@ -6,6 +6,7 @@ use mro 'c3'; extends 'Catalyst::Controller'; +use Catalyst::Exception (); use HTTP::Request::AsCGI (); use HTTP::Request (); use URI (); @@ -233,7 +234,12 @@ sub wrap_cgi { select($old); - die $saved_error if $saved_error; + if( $saved_error ) { + die $saved_error if ref $saved_error; + Catalyst::Exception->throw( + message => "CGI invocation failed: $saved_error" + ); + } } return $env->response;