]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/GzipFilter.pm
treewide: use warn() or carp() instead of env->{psgi.errors}
[public-inbox.git] / lib / PublicInbox / GzipFilter.pm
index c50c26c5c21cfe418b66f0430d2c375b2a402679..c621617107259ec05954b0eef5370c282f773166 100644 (file)
@@ -84,6 +84,12 @@ sub gzip_or_die () {
        $gz;
 }
 
+sub gone { # what: search/over/mm
+       my ($ctx, $what) = @_;
+       warn "W: `$ctx->{ibx}->{name}' $what went away unexpectedly\n";
+       undef;
+}
+
 # for GetlineBody (via Qspawn) when NOT using $env->{'pi-httpd.async'}
 # Also used for ->getline callbacks
 sub translate ($$) {
@@ -148,8 +154,7 @@ sub close {
 sub bail  {
        my $self = shift;
        if (my $env = $self->{env}) {
-               eval { $env->{'psgi.errors'}->print(@_, "\n") };
-               warn("E: error printing to psgi.errors: $@", @_) if $@;
+               warn @_, "\n";
                my $http = $env->{'psgix.io'} or return; # client abort
                eval { $http->close }; # should hit our close
                warn "E: error in http->close: $@" if $@;