Using croak was simply a mistake. I always wanted a stack trace.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit (3.6~) unstable; urgency=medium
Minor improvements:
dgit (3.6~) unstable; urgency=medium
Minor improvements:
- * Call `confess' to print a stack trace when we pass undef to
- shellquote (eg as a result of debugcmd). Turns an undefined
- warning into an explicit internal error.
+ * Use `confess' to print a stack trace in a couple of internal error
+ rcases.
my ($c) = @_;
foreach my $src (@gitcfgsources) {
my $l = $gitcfgs{$src}{$c};
my ($c) = @_;
foreach my $src (@gitcfgsources) {
my $l = $gitcfgs{$src}{$c};
- croak "$l $c" if $l && !ref $l;
+ confess "internal error ($l $c)" if $l && !ref $l;
printdebug"C $c ".(defined $l ?
join " ", map { messagequote "'$_'" } @$l :
"undef")."\n"
printdebug"C $c ".(defined $l ?
join " ", map { messagequote "'$_'" } @$l :
"undef")."\n"