Skip to content

Commit

Permalink
handle exception objects with an as_psgi method directly
Browse files Browse the repository at this point in the history
  • Loading branch information
doy committed Jun 15, 2011
1 parent 5db3bd7 commit 3652972
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Plack/Middleware/HTTPExceptions.pm
Expand Up @@ -46,6 +46,9 @@ sub transform_error {
my($self, $e, $env) = @_;

my($code, $message);
if (blessed $e && $e->can('as_psgi')) {
return $e->as_psgi;
}
if (blessed $e && $e->can('code')) {
$code = $e->code;
$message =
Expand Down

0 comments on commit 3652972

Please sign in to comment.