[BioRuby-cvs] bioruby/lib/bio/io flatfile.rb,1.54,1.55

Naohisa Goto ngoto at dev.open-bio.org
Mon Feb 12 09:59:40 UTC 2007


Update of /home/repository/bioruby/bioruby/lib/bio/io
In directory dev.open-bio.org:/tmp/cvs-serv11192/lib/bio/io

Modified Files:
	flatfile.rb 
Log Message:
Bio::FlatFile#next_entry now raises UnknownDataFormatError when data format
hasn't been specified due to the fail of file format autodetection.


Index: flatfile.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/io/flatfile.rb,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -d -r1.54 -r1.55
*** flatfile.rb	12 Feb 2007 02:15:45 -0000	1.54
--- flatfile.rb	12 Feb 2007 09:59:37 -0000	1.55
***************
*** 579,584 ****
--- 579,590 ----
      end
  
+     # Exception class to be raised when data format hasn't been specified.
+     class UnknownDataFormatError < IOError
+     end
+ 
      # Get next entry.
      def next_entry
+       raise UnknownDataFormatError, 
+       'file format auto-detection failed?' unless @dbclass
        if @skip_leader_mode and
            ((@firsttime_flag and @skip_leader_mode == :firsttime) or




More information about the bioruby-cvs mailing list