From 9cd327666f087566dc256cc89cd77b5eaa35b73a Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 20 Feb 2003 19:55:19 +0000 Subject: add catch_cdie's around fsedit::check_mntpoint and fsedit::add --- perl-install/diskdrake/interactive.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'perl-install/diskdrake') diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm index ef10b3a6d..0f0a39fa7 100644 --- a/perl-install/diskdrake/interactive.pm +++ b/perl-install/diskdrake/interactive.pm @@ -483,7 +483,10 @@ sub Create { check($in, $hd, $part, $all_hds) or return 1; $migrate_files = need_migration($in, $part->{mntpoint}) or return 1; - eval { fsedit::add($hd, $part, $all_hds, { force => 1, primaryOrExtended => $primaryOrExtended }) }; + eval { + catch_cdie { fsedit::add($hd, $part, $all_hds, { force => 1, primaryOrExtended => $primaryOrExtended }) } + sub { $in->ask_warn('', formatError($@)); 1 }; + }; if (my $err = $@) { if ($err =~ /raw_add/ && $hd->hasExtended && !$hd->{primary}{extended}) { $in->ask_warn(N("Error"), N("You can't create a new partition @@ -1013,7 +1016,10 @@ sub check_type { } sub check_mntpoint { my ($in, $mntpoint, $hd, $part, $all_hds) = @_; - eval { fsedit::check_mntpoint($mntpoint, $hd, $part, $all_hds) }; + eval { + catch_cdie { fsedit::check_mntpoint($mntpoint, $hd, $part, $all_hds) } + sub { $in->ask_warn('', formatError($@)); 1 }; + }; if (my $err = $@) { $in->ask_warn('', formatError($err)); return; -- cgit v1.2.1