summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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") };