[Bioperl-guts-l] bioperl-live/Bio/SeqIO strider.pm,1.10,1.11

Malcom Cook mcook at dev.open-bio.org
Wed Jan 24 11:10:18 EST 2007


Update of /home/repository/bioperl/bioperl-live/Bio/SeqIO
In directory dev.open-bio.org:/tmp/cvs-serv28652

Modified Files:
	strider.pm 
Log Message:
Improved error reporting on non-strider formatted file


Index: strider.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/SeqIO/strider.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** strider.pm	28 Sep 2006 04:09:01 -0000	1.10
--- strider.pm	24 Jan 2007 16:10:16 -0000	1.11
***************
*** 142,146 ****
    my $fh =  $self->_fh;
    my ($header,$sequence,$fulldesc);
!   read $fh,$header,$size_F_HEADER or return ; #don't die here with "could not read header: $@" !!!;
    $self->throw("required $size_F_HEADER bytes while reading strider header in " . $self->{'_file'} . " but found: " . length($header))  
      unless $size_F_HEADER == length($header);
--- 142,147 ----
    my $fh =  $self->_fh;
    my ($header,$sequence,$fulldesc);
!   eval {read $fh,$header,$size_F_HEADER};
!   $self->throw ("$@  while attempting to reading strider header from " . $self->{'_file'}) if $@; 
    $self->throw("required $size_F_HEADER bytes while reading strider header in " . $self->{'_file'} . " but found: " . length($header))  
      unless $size_F_HEADER == length($header);



More information about the Bioperl-guts-l mailing list