From 018303607f11609fa8c7900a359b0d55c96bb3ab Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 6 Dec 2012 16:13:32 +0000 Subject: (start_pushing_error,popup_errors,error) factorize "background" error handling --- perl-install/install/any.pm | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'perl-install/install/any.pm') diff --git a/perl-install/install/any.pm b/perl-install/install/any.pm index 6f211c991..d73d3ed44 100644 --- a/perl-install/install/any.pm +++ b/perl-install/install/any.pm @@ -325,20 +325,14 @@ sub setPackages { my ($suppl_method, $copy_rpms_on_disk); { - my @errors; - local $urpm->{error} = sub { - log::l("urpmi error: $_[0]"); - push @errors, @_; - }; + install::pkgs::start_pushing_error(); ($suppl_method, $copy_rpms_on_disk) = install::media::get_media($o, $media, $urpm); if ($suppl_method) { 1 while $o->selectSupplMedia; } install::media::update_media($urpm); - if (@errors) { - $::o->ask_warn(undef, N("An error occurred:") . "\n\n" . join("\n", @errors)); - } + install::pkgs::popup_errors(); } # actually read synthesis now we have all the ones we want: -- cgit v1.2.1