|
Lines 21-26
use Scalar::Util qw( blessed );
Link Here
|
| 21 |
|
21 |
|
| 22 |
use Mojo::Base 'Mojolicious::Plugin'; |
22 |
use Mojo::Base 'Mojolicious::Plugin'; |
| 23 |
|
23 |
|
|
|
24 |
use Devel::StackTrace; |
| 25 |
|
| 24 |
=head1 NAME |
26 |
=head1 NAME |
| 25 |
|
27 |
|
| 26 |
Koha::REST::Plugin::Exceptions |
28 |
Koha::REST::Plugin::Exceptions |
|
Lines 68-74
sub register {
Link Here
|
| 68 |
|
70 |
|
| 69 |
my $message = "$method $path: unhandled exception $type\<\<$exception_string\>\>"; |
71 |
my $message = "$method $path: unhandled exception $type\<\<$exception_string\>\>"; |
| 70 |
|
72 |
|
| 71 |
$c->app->log->error( "$message" ); |
73 |
my $trace = Devel::StackTrace->new->as_string; |
|
|
74 |
|
| 75 |
$c->app->log->error( "$message\n$trace"); |
| 72 |
|
76 |
|
| 73 |
$c->render( |
77 |
$c->render( |
| 74 |
status => 500, |
78 |
status => 500, |
| 75 |
- |
|
|