Skip to content

Recursive: should rethrow other exceptions #166

Closed
waba opened this Issue Jan 23, 2011 · 5 comments

2 participants

@waba
waba commented Jan 23, 2011

When an non-Recursive exception is thrown within a Recursive-wrapped request, it is not passed on. So may I suggest that


else { die $_ ; }

be added to the if-statement in the first catch {} block in Plack::Middleware::Recursive?

@miyagawa
plack member

Can you write a unit test explaining this problem?

@waba
waba commented Jan 26, 2011

Put in a different way: it is currently not possible to use Recursive and HTTPException middlewares together, because the HTTPException is caught by Recursive and a ForwardRequest is caught by HTTPException. So shouldn't 'unknown' exceptions always be rethrown, so they can be handled at the appropriate level?

@miyagawa
plack member

Recursive should be inner of HTTPExceptions and Recursive should rethrow the exception as you suggested - that should solve the problem, no?

I just pointed out your failing unit test is not a good test since it doesn't work that way.

@waba
waba commented Jan 26, 2011

Yes it would, thanks. I'll see if I can make a working test ...

@miyagawa
plack member

propagate unhandled exceptions. Closed by 4d9038a

@leedo leedo pushed a commit that referenced this issue Apr 17, 2011
@miyagawa miyagawa Checking in changes prior to tagging of version 0.9968.
Changelog diff is:

diff --git a/Changes b/Changes
index 08ae1ca..14346e1 100644
--- a/Changes
+++ b/Changes
@@ -2,8 +2,11 @@ Revision history for Perl extension Plack

 Take a look at http://github.com/miyagawa/Plack/issues for the planned changes before 1.0 release.

-0.9968
+0.9968  Wed Feb  9 19:07:48 PST 2011
         - Fixed Recursive middleware to rethrow unknown exceptions. #166 (reported by waba)
+        - Document response_cb. #121
+        - Plack::Loader to print errors if it is really a compilation error
+        - Fixed the Cascade app to work with all 404 responses with the streaming interface. #171 (reported by eevee)

 0.9967  Tue Jan 25 14:26:37 PST 2011
         - Fixed StackTrace to require D::ST::WithLexicals 0.08 that supports 'message' (doy)
7decea4
@leedo leedo pushed a commit that referenced this issue Apr 17, 2011
@miyagawa miyagawa Checking in changes prior to tagging of version 0.9969.
Changelog diff is:

diff --git a/Changes b/Changes
index 14346e1..11607cb 100644
--- a/Changes
+++ b/Changes
@@ -2,6 +2,13 @@ Revision history for Perl extension Plack

 Take a look at http://github.com/miyagawa/Plack/issues for the planned changes before 1.0 release.

+0.9969  Fri Feb 18 21:35:29 PST 2011
+        - Suppress the use of unlocalized $_ in Plack::Runner (mst)
+        - Plack::Handler::Net::FastCGI is now removed from Plack core dist.
+          It will be released as a separate distribution on CPAN.
+        - Fixed Plack::Handler::Apache2 so that it can safely call log (Andy Wardley)
+        - StackTrace: Display graceful fallback errors when $SIG{__DIE__} is overridden in the application (mkanat)
+
 0.9968  Wed Feb  9 19:07:48 PST 2011
         - Fixed Recursive middleware to rethrow unknown exceptions. #166 (reported by waba)
         - Document response_cb. #121
8a03145
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.