From 6649f7e8b8036b15ef44587b0fb276ec3a0f6041 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 20 Feb 2004 16:46:44 +0000 Subject: do not horribly die at install time on error --- perl-install/network/netconnect.pm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'perl-install') diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index ea93ecbb2..a1c2d9ceb 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -73,7 +73,7 @@ sub get_subwizard { } # configuring all network devices - sub main { +sub real_main { my ($_prefix, $netcnx, $in, $o_netc, $o_mouse, $o_intf, $o_first_time, $o_noauto) = @_; my $netc = $o_netc ||= {}; my $mouse = $o_mouse ||= {}; @@ -1245,6 +1245,18 @@ fi } } +sub main { + my ($_prefix, $netcnx, $in, $o_netc, $o_mouse, $o_intf, $o_first_time, $o_noauto) = @_; + eval { real_main('', , $netcnx, $in, $o_netc, $o_mouse, $o_intf, $o_first_time, $o_noauto) }; + my $err = $@; + if ($err) { # && $in->isa('interactive::gtk') + local $::isEmbedded = 0; # to prevent sub window embedding + local $::isWizard = 0 if !$::isInstall; # to prevent sub window embedding + #err_dialog(N("Error"), N("An unexpected error has happened:\n%s", $err)); + $in->ask_warn(N("Error"), N("An unexpected error has happened:\n%s", $err)); + } +} + sub set_profile { my ($netcnx) = @_; system(qq(/sbin/set-netprofile "$netcnx->{PROFILE}")); -- cgit v1.2.1