summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-01-22 20:31:52 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-01-22 20:31:52 +0000
commitf85da3ea0e86a4a79dbb3a8fb4dd1c5d499deebe (patch)
tree97431ce90db1e1166cdc52b91e23b3266e7e3ff9
parent4430474523a0147b6448b9945ddd2e2cbc6c08d8 (diff)
downloaddrakx-f85da3ea0e86a4a79dbb3a8fb4dd1c5d499deebe.tar
drakx-f85da3ea0e86a4a79dbb3a8fb4dd1c5d499deebe.tar.gz
drakx-f85da3ea0e86a4a79dbb3a8fb4dd1c5d499deebe.tar.bz2
drakx-f85da3ea0e86a4a79dbb3a8fb4dd1c5d499deebe.tar.xz
drakx-f85da3ea0e86a4a79dbb3a8fb4dd1c5d499deebe.zip
cleanup error messages (and fix diskdrake's)
-rw-r--r--perl-install/install_any.pm2
-rw-r--r--perl-install/install_steps_interactive.pm2
-rwxr-xr-xperl-install/standalone/diskdrake10
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") };