diff options
-rw-r--r-- | Rpmdrake/gui.pm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm index 3e66575d..cc0a703d 100644 --- a/Rpmdrake/gui.pm +++ b/Rpmdrake/gui.pm @@ -637,7 +637,7 @@ sub toggle_nodes { } } -sub do_action { +sub do_action__real { my ($options, $callback_action, $o_info) = @_; require urpm::sys; if (!urpm::sys::check_fs_writable()) { @@ -670,6 +670,16 @@ Do you really want to install all the selected packages?"), yesno => 1) } } +sub do_action { + my ($options, $callback_action, $o_info) = @_; + my $res = eval { do_action__real($options, $callback_action, $o_info) }; + if (my $err = $@) { + interactive_msg(N("Fatal error"), + N("A fatal error occurred: %s.", $err)); + } + $res; +} + sub ctreefy { join('|', map { translate($_) } split m|/|, $_[0]); |