I create Dancer appliation and subscribe to hook after
This hook runs after a request has been processed, but before the response is sent.
If I understand correct, even if exception occur the response is being processed, so this hook after should be called before error response is sent
Also I see after_error_render hook. But it has so small documentation that I do not understand. Should it called additionally to after event when exception occur, or should it called instead of after event?
use Dancer;
get '/error' => sub {
die "Error";
};
hook after => sub {
warn "After render";
};
hook after_error_render => sub {
warn "Error occur";
};
dance;