]> Sergey Matveev's repositories - public-inbox.git/commitdiff
viewvcs: die on tmpfile() errors
authorEric Wong <e@80x24.org>
Sun, 24 Oct 2021 01:45:22 +0000 (01:45 +0000)
committerEric Wong <e@80x24.org>
Sun, 24 Oct 2021 02:20:33 +0000 (02:20 +0000)
Just let Plack::Util::run_app catch the error and generate
a 500 response for it.

lib/PublicInbox/ViewVCS.pm

index 021b70cf2180a935711ad5d602e2c600962f81d0..3cbc363b9d113b4b811af9d1acc121e03ad9f5cd 100644 (file)
@@ -194,7 +194,7 @@ sub show ($$;$) {
                $hints->{$to} = $v if $v ne '';
        }
 
-       $ctx->{'log'} = tmpfile("solve.$oid_b");
+       $ctx->{'log'} = tmpfile("solve.$oid_b") // die "tmpfile: $!";
        $ctx->{fn} = $fn;
        my $solver = PublicInbox::SolverGit->new($ctx->{ibx},
                                                \&solve_result, $ctx);