diff options
author | Thierry Vignaud <tv@mandriva.org> | 2006-11-27 13:28:24 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2006-11-27 13:28:24 +0000 |
commit | 3b9b9b84cb63eda9503c1ccf4226dab742ea654c (patch) | |
tree | f6c44c37f2629aa342cf37c5fd854270d22603f1 | |
parent | 8da2823381272fd50a8593a8d8fe97ff5700a694 (diff) | |
download | rpmdrake-3b9b9b84cb63eda9503c1ccf4226dab742ea654c.tar rpmdrake-3b9b9b84cb63eda9503c1ccf4226dab742ea654c.tar.gz rpmdrake-3b9b9b84cb63eda9503c1ccf4226dab742ea654c.tar.bz2 rpmdrake-3b9b9b84cb63eda9503c1ccf4226dab742ea654c.tar.xz rpmdrake-3b9b9b84cb63eda9503c1ccf4226dab742ea654c.zip |
(get_info) defensive programming (#26099)
-rwxr-xr-x | rpmdrake | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1106,7 +1106,12 @@ or you already installed all of them.")); exists $pkgs->{$key} or return [ [ N("Description not available for this package\n") ] ]; exists $pkgs->{$key}{description} && exists $pkgs->{$key}{files} or slow_func($tree->window, sub { extract_header($pkgs->{$key}, $urpm) }); - format_pkg_simplifiedinfo($pkgs, $key, $urpm, $descriptions); + my $s; + eval { $s = format_pkg_simplifiedinfo($pkgs, $key, $urpm, $descriptions) }; + if (my $err = $@) { + $s = N("A fatal error occurred: %s.", $err); + } + $s; }, check_interactive_to_toggle => sub { 1 }, grep_allowed_to_toggle => sub { @_ }, |