diff options
author | Thierry Vignaud <tv@mandriva.org> | 2006-11-27 13:28:10 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2006-11-27 13:28:10 +0000 |
commit | d7f12f12f90f155b5c3a73d1792633b85e095415 (patch) | |
tree | 7e96d1e0402fd9d0a6b6dcec5205e037381443c0 | |
parent | e110cfbe6251bf90e3046ae4a9617ffe10dd2016 (diff) | |
download | rpmdrake-d7f12f12f90f155b5c3a73d1792633b85e095415.tar rpmdrake-d7f12f12f90f155b5c3a73d1792633b85e095415.tar.gz rpmdrake-d7f12f12f90f155b5c3a73d1792633b85e095415.tar.bz2 rpmdrake-d7f12f12f90f155b5c3a73d1792633b85e095415.tar.xz rpmdrake-d7f12f12f90f155b5c3a73d1792633b85e095415.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 { @_ }, |