Skip to content
Snippets Groups Projects
Commit 99a3b25e authored by Andy Yates's avatar Andy Yates
Browse files

We are providing $! information when we have not been able to print to a file handle

parent 3189a7d9
No related branches found
No related tags found
No related merge requests found
......@@ -136,7 +136,7 @@ sub print_metadata {
my $fh = $self->{'filehandle'};
my $function = $self->header_function();
my $metadata = $function->($slice);
print $fh '>'.$metadata."\n";
print $fh '>'.$metadata."\n" or throw "Error writing to file handle: $!";
}
=head2 print_Seq
......@@ -174,7 +174,7 @@ sub print_Seq {
$there = $end if($there > $end);
my $seq = $slice->subseq($here, $there);
$seq =~ s/(.{1,$width})/$1\n/g;
print $fh $seq or die "Error writing to file handle";
print $fh $seq or throw "Error writing to file handle: $!";
$here = $there + 1;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment