aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake/gui.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-03-19 12:17:15 +0000
committerThierry Vignaud <tv@mandriva.org>2007-03-19 12:17:15 +0000
commit29f9c824ea2f72aa32c50db4cf57642c5fb71959 (patch)
tree4c62b997f52722f9dda97816916fd60bb6e4b453 /Rpmdrake/gui.pm
parentdf0fd2792a3cbeea2eb97e237d7b4b9ba1bc1ec8 (diff)
downloadrpmdrake-29f9c824ea2f72aa32c50db4cf57642c5fb71959.tar
rpmdrake-29f9c824ea2f72aa32c50db4cf57642c5fb71959.tar.gz
rpmdrake-29f9c824ea2f72aa32c50db4cf57642c5fb71959.tar.bz2
rpmdrake-29f9c824ea2f72aa32c50db4cf57642c5fb71959.tar.xz
rpmdrake-29f9c824ea2f72aa32c50db4cf57642c5fb71959.zip
(do_action) rename as do_action__real() and introduce the do_action()
wrapper so that crashes got caught more nicely
Diffstat (limited to 'Rpmdrake/gui.pm')
-rw-r--r--Rpmdrake/gui.pm12
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]);