# This file documents the revision history for Perl extension Catalyst.
+5.90061 - 2014-04-14
+ - HTTP::Exception objects were not properly bubbled up to middleware since
+ there was some code in Catalyst that was triggering stringification.
+
5.90061 - 2014-03-10
- Reverted a change related to how plugins get initialized that was
introduced by a change in December.
# Remember to update this in Catalyst::Runtime as well!
-our $VERSION = '5.90061';
+our $VERSION = '5.90062';
sub import {
my ( $class, @arguments ) = @_;
$c->dispatch;
$status = $c->finalize;
} catch {
- chomp(my $error = $_);
- $class->log->error(qq/Caught exception in engine "$error"/);
#rethow if this can be handled by middleware
- if(blessed $error && ($error->can('as_psgi') || $error->can('code'))) {
- $error->can('rethrow') ? $error->rethrow : croak $error;
+ if(blessed $_ && ($_->can('as_psgi') || $_->can('code'))) {
+ $_->can('rethrow') ? $_->rethrow : croak $_;
}
+ chomp(my $error = $_);
+ $class->log->error(qq/Caught exception in engine "$error"/);
};
$COUNT++;
# Remember to update this in Catalyst as well!
-our $VERSION = '5.90061';
+our $VERSION = '5.90062';
=head1 NAME
{
package MyApp::Exception;
+ use overload
+ # Use the overloading thet HTTP::Exception uses
+ bool => sub { 1 }, '""' => 'as_string', fallback => 1;
+
sub new {
my ($class, $code, $headers, $body) = @_;
return bless +{res => [$code, $headers, $body]}, $class;
$responder->([$code, $headers, $body]);
};
}
+
+ sub as_string { 'bad stringy bad' }
package MyApp::Controller::Root;