From 93adc5a588e86b2aa1ff09f30a5c47dd38dd590f Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 13 Apr 2001 14:08:41 +0000 Subject: (ask_from_entries_refH_powered_normalize): log the empty list instead of dying (for 8.0 only, should be switched back to die) (ask_from_listf): display the backtrace when empty list --- perl-install/interactive.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'perl-install') diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm index 0ebe74434..c16e98d51 100644 --- a/perl-install/interactive.pm +++ b/perl-install/interactive.pm @@ -127,7 +127,7 @@ sub ask_from_listf_ { } sub ask_from_listf { my ($o, $title, $message, $f, $l, $def, $help) = @_; - @$l == 0 and die 'ask_from_list: empty list'; + @$l == 0 and die "ask_from_list: empty list\n" . common::backtrace(); @$l == 1 and return $l->[0]; goto &ask_from_listf_no_check; } @@ -248,7 +248,10 @@ sub ask_from_entries_refH_powered_normalize { #- don't display empty lists and one element lists @$l = grep { if ($_->{list} && $_->{not_edit}) { - @{$_->{list}} == () and die 'ask_from_list: empty list'; + if (@{$_->{list}} == ()) { + require log; + log::l("ask_from_entries_refH_powered_normalize: empty list\n" . common::backtrace()); + } @{$_->{list}} > 1; } else { 1; -- cgit v1.2.1