Commit 1fa07472 authored by Kevin Atkinson's avatar Kevin Atkinson

Fix bug causing strange errors from snipit due to an invalid assumtion
about __DIE__ handler in libtblog.pm.in.
parent d258dde6
......@@ -1080,9 +1080,8 @@ sub tblog_start_capture( ;@ ) {
} elsif ($_ eq 'stderr') {
tie *STDERR, 'libtblog', \*SERR;
} elsif ($_ eq 'die') {
# Should not need to worry about parser errors since the
# handlers will be set only after parsing is done
$SIG{__DIE__} = sub {
return unless defined $^S; # In Parser
return if $^S; # In Eval Block
tblog_stop_capture();
local $_ = $_[0];
......@@ -1091,9 +1090,8 @@ sub tblog_start_capture( ;@ ) {
die format_message(scriptname(), $ERR, $_);
};
} elsif ($_ eq 'warn') {
# Should not need to worry about parser errors since the
# handlers will be set only after parsing is done
$SIG{__WARN__} = sub {
warn $_[0] unless defined $^S; # In Parser
local $_ = $_[0];
s/\n$//;
dblog($WARNING, {inferred=>1, cause=>'internal'}, $_);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment