aboutsummaryrefslogtreecommitdiffstats
path: root/bin/gtk-fair-viewer
diff options
context:
space:
mode:
Diffstat (limited to 'bin/gtk-fair-viewer')
-rwxr-xr-xbin/gtk-fair-viewer16
1 files changed, 10 insertions, 6 deletions
diff --git a/bin/gtk-fair-viewer b/bin/gtk-fair-viewer
index d6414ad..15951ac 100755
--- a/bin/gtk-fair-viewer
+++ b/bin/gtk-fair-viewer
@@ -380,27 +380,30 @@ while (my ($key, $value) = each %objects) {
local $SIG{__WARN__} = sub {
my $warning = strip_spaces(join('', @_));
+ say STDERR $warning;
+
return if $warning =~ / at \(eval /;
return if $warning =~ /\bunhandled exception in callback:/;
+ return if $warning =~ /, or \} expected while parsing object\/hash/;
$warning = "[" . localtime(time) . "]: " . $warning . "\n";
- print STDERR $warning;
set_text($warnings_textview, $warning, append => 1);
};
# __DIE__ handle
local $SIG{__DIE__} = sub {
- my $error = join('', @_);
my $caller = [caller]->[0];
+ my $error = strip_spaces(join('', @_));
+
+ say STDERR $error;
- # Ignore eval() errors
+ # Ignore harmless errors
return if $error =~ / at \(eval /;
+ return if $error =~ /, or \} expected while parsing object\/hash/;
- # Just print the third-party errors,
- # without displaying them to the user.
+ # Ignore third-party errors
if (not $caller =~ /^(?:main\z|WWW::FairViewer\b)/) {
- print STDERR "@_\n";
return;
}
@@ -416,6 +419,7 @@ local $SIG{__DIE__} = sub {
}
. "\n=>> Previous warnings:\n" . get_text($warnings_textview)
);
+
warn $error;
$errors_window->show;
return 1;