Ok, just tried it
It works as expected, but in my template, I didn't get the $error variable with the correct value, instead of that, I got "Internal Server Error".
I raised a exception in a route with:
die "my test exception";
and the 500 page prints "Internal server error". I have checked your Kelp::Response module, and I think you have to add the yellow marked code:
sub render_500 {
my ( $self, $message ) = @_;
if ( $self->app->mode ne 'deployment' ) {
if ($message) {
return $self->set_code(500)->render($message);
}
else {
local $SIG{__DIE__}; # Silence StackTrace
return $self->render_error( 500, $message );
}
}
$self->render_error(500, $message);
}
Thanks, Stefan (sorry for the typo in your name in previous message)