diff options
author | Eric Wong <e@yhbt.net> | 2020-01-09 11:14:51 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2020-01-09 11:23:32 +0000 |
commit | dfd30c7aa686968b8a0dbd65c40b90d92816f87c (patch) | |
tree | 00e7b973243c998dc48a0fd7460ec35abb11c849 /lib/PublicInbox/HTTP.pm | |
parent | cb4f09264abe20c820939814e87442fe812713bc (diff) | |
download | public-inbox-dfd30c7aa686968b8a0dbd65c40b90d92816f87c.tar.gz |
Application-supplied callbacks may error out, try to log them so the PSGI app developer can figure out what went wrong.
Diffstat (limited to 'lib/PublicInbox/HTTP.pm')
-rw-r--r-- | lib/PublicInbox/HTTP.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/PublicInbox/HTTP.pm b/lib/PublicInbox/HTTP.pm index 1346901a..a6ec1d0d 100644 --- a/lib/PublicInbox/HTTP.pm +++ b/lib/PublicInbox/HTTP.pm @@ -174,7 +174,10 @@ sub app_dispatch { response_write($self, $env, $res); } }; - $self->close if $@; + if ($@) { + err($self, "response_write error: $@"); + $self->close; + } } sub response_header_write { |