diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-01-22 20:31:52 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-01-22 20:31:52 +0000 |
commit | f85da3ea0e86a4a79dbb3a8fb4dd1c5d499deebe (patch) | |
tree | 97431ce90db1e1166cdc52b91e23b3266e7e3ff9 /perl-install | |
parent | 4430474523a0147b6448b9945ddd2e2cbc6c08d8 (diff) | |
download | drakx-f85da3ea0e86a4a79dbb3a8fb4dd1c5d499deebe.tar drakx-f85da3ea0e86a4a79dbb3a8fb4dd1c5d499deebe.tar.gz drakx-f85da3ea0e86a4a79dbb3a8fb4dd1c5d499deebe.tar.bz2 drakx-f85da3ea0e86a4a79dbb3a8fb4dd1c5d499deebe.tar.xz drakx-f85da3ea0e86a4a79dbb3a8fb4dd1c5d499deebe.zip |
cleanup error messages (and fix diskdrake's)
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/install_any.pm | 2 | ||||
-rw-r--r-- | perl-install/install_steps_interactive.pm | 2 | ||||
-rwxr-xr-x | perl-install/standalone/diskdrake | 10 |
3 files changed, 9 insertions, 5 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index b4b6f75e7..2cce2ee31 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -954,7 +954,7 @@ sub getHds { my $all_hds = catch_cdie { fsedit::hds(\@drives, $flags) } sub { $ok = 0; - my $err = $@; $err =~ s/ at (.*?)$//; + my $err = formatError($@); log::l("error reading partition table: $err"); !$flags->{readonly} && $f_err and $f_err->($err); }; diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index d0cea804a..b742c0049 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -64,7 +64,7 @@ use log; #-###################################################################################### sub errorInStep($$) { my ($o, $err) = @_; - $o->ask_warn(_("Error"), [ _("An error occurred"), common::formatError($err) ]); + $o->ask_warn(_("Error"), [ _("An error occurred"), formatError($err) ]); } sub kill_action { diff --git a/perl-install/standalone/diskdrake b/perl-install/standalone/diskdrake index d428e6955..414a261fa 100755 --- a/perl-install/standalone/diskdrake +++ b/perl-install/standalone/diskdrake @@ -66,11 +66,15 @@ if ($fileshare) { my ($all_hds) = catch_cdie { fsedit::hds([ detect_devices::hds() ], {}) } sub { - my ($err) = $@ =~ /(.*) at /; - $@ =~ /overlapping/ and $in->ask_warn('', $@), return 1; - $in->ask_okcancel(_("Error"), + my $err = formatError($@); + if ($err =~ /overlapping/) { + $in->ask_warn('', $err); + 1; + } else { + !$in->ask_okcancel(_("Error"), [_("I can't read your partition table, it's too corrupted for me :( I'll try to go on blanking bad partitions"), $err]); + } }; $SIG{__DIE__} = sub { my $m = chomp_($_[0]); log::l("ERROR: $m") }; |