Skip to content

Commit

Permalink
For GH-209 - avoid calling as_error twice
Browse files Browse the repository at this point in the history
  • Loading branch information
hkoba committed Jan 14, 2022
1 parent 094685c commit 2d19c6a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Lite/WebMVC0/DirApp.pm
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,12 @@ sub error_handler {
(my MY $self, my $type, my Error $err) = @_;
# どこに出力するか、って問題も有る。 $CON を rewind すべき?
my $errcon = try_invoke($self->CON, 'as_error') || do {
if ($SYS) {
$SYS->make_connection(undef, yatt => $self, noheader => 1);
} else {
$self->CON;
}
my $con = $SYS
? $SYS->make_connection(undef, yatt => $self, noheader => 1)
: $self->CON;
try_invoke($con, 'as_error');
$con;
};
try_invoke($errcon, 'as_error');

$errcon->add_error($err);

Expand Down

0 comments on commit 2d19c6a

Please sign in to comment.