summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-08-06 13:38:32 +0000
committerThierry Vignaud <tv@mandriva.org>2007-08-06 13:38:32 +0000
commit63ca48e18a8429edefc63b28621959cc87d4f8e1 (patch)
treec088bd9f4d5261254c264c2f9423fb5a73cbac5a /perl-install
parent91155c282c1f4547d9f46d8007bb7645a16d300f (diff)
downloaddrakx-63ca48e18a8429edefc63b28621959cc87d4f8e1.tar
drakx-63ca48e18a8429edefc63b28621959cc87d4f8e1.tar.gz
drakx-63ca48e18a8429edefc63b28621959cc87d4f8e1.tar.bz2
drakx-63ca48e18a8429edefc63b28621959cc87d4f8e1.tar.xz
drakx-63ca48e18a8429edefc63b28621959cc87d4f8e1.zip
(bug_handler) make it more readable
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/standalone.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/perl-install/standalone.pm b/perl-install/standalone.pm
index f82c2509c..a4bb48969 100644
--- a/perl-install/standalone.pm
+++ b/perl-install/standalone.pm
@@ -189,16 +189,21 @@ our @drakx_modules = qw(Xconfig::card Xconfig::default Xconfig::main Xconfig::mo
sub bug_handler {
my ($error) = @_;
+
# exceptions in eval are OK:
return if $error && $^S;
+
# exceptions with "\n" are normal ways to quit:
if ($error eq MDK::Common::String::formatError($error)) {
warn $error;
exit(255);
}
+
# we want the full backtrace:
$error .= common::backtrace() if $error;
+
my $progname = $0;
+
# do not loop if drakbug crashes and do not complain about wizcancel:
if ($progname =~ /drakbug/ || $error =~ /wizcancel/) {
warn $error;
@@ -207,6 +212,7 @@ sub bug_handler {
$progname =~ s|.*/||;
exec('drakbug', if_($error, '--error', $error), '--incident', $progname,);
}
+
$SIG{SEGV} = \&bug_handler;
$SIG{__DIE__} = \&bug_handler;