Bug 36935: Add a 'die' message to file parsing

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 04a038f6b0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Matt Blenkinsop 2024-05-23 09:41:22 +00:00 committed by Lucas Gass
parent 008b7c72bf
commit 52fba8067c
1 changed files with 1 additions and 1 deletions

View File

@ -229,7 +229,7 @@ sub read_file {
my $delimiter = $file->{filename} =~ /\.tsv$/ ? "\t" : ",";
my $quote_char = $file->{filename} =~ /\.tsv$/ ? "\"" : "\"";
open my $fh, "<", \$file_content or die;
open my $fh, "<", \$file_content or die "Could not open file $file->{filename}: $!";
my $csv = Text::CSV_XS->new(
{
sep_char => $delimiter,