]> git.donarmstrong.com Git - debbugs.git/commitdiff
croak in subroutines
authorDon Armstrong <don@donarmstrong.com>
Thu, 6 Jul 2017 01:18:26 +0000 (18:18 -0700)
committerDon Armstrong <don@donarmstrong.com>
Thu, 6 Jul 2017 01:18:26 +0000 (18:18 -0700)
Debbugs/Common.pm
Debbugs/Packages.pm

index 9305d3f161e27bf410394b3412d385b9c9fb617d..276cbd0fdfc46217a262055f363db6d4d1af6c5c 100644 (file)
@@ -431,7 +431,7 @@ sub __add_to_hash {
     }
     $type //= 'address';
     my $fh = IO::File->new($fn,'r') or
-       die "Unable to open $fn for reading: $!";
+       croak "Unable to open $fn for reading: $!";
     binmode($fh,':encoding(UTF-8)');
     while (<$fh>) {
        chomp;
index 6974c1778d1a3fc4b1d71cbc45f15793ada267d6..6980315f06afef7b160d6ea47af695c1dc5bc2eb 100644 (file)
@@ -79,7 +79,7 @@ sub getpkgsrc {
     my %srcpkg;
 
     my $fh = IO::File->new($config{package_source},'r')
-       or die("Unable to open $config{package_source} for reading: $!");
+       or croak("Unable to open $config{package_source} for reading: $!");
     while(<$fh>) {
        next unless m/^(\S+)\s+(\S+)\s+(\S.*\S)\s*$/;
        my ($bin,$cmp,$src)=($1,$2,$3);