[BioRuby-cvs] bioruby/lib/bio command.rb,1.12,1.13

Naohisa Goto ngoto at dev.open-bio.org
Mon Mar 26 17:09:47 UTC 2007


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

Modified Files:
	command.rb 
Log Message:
changed to handle exceptions and to do exit! to avoid failure on error (e.g. commmand not found)


Index: command.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/command.rb,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** command.rb	14 Jul 2006 14:23:47 -0000	1.12
--- command.rb	26 Mar 2007 17:09:45 -0000	1.13
***************
*** 116,120 ****
        else
          # child
!         Kernel.exec(*cmd)
        end
      end
--- 116,126 ----
        else
          # child
!         begin
!           Kernel.exec(*cmd)
!         rescue Errno::ENOENT, Errno::EACCES
!           Process.exit!(127)
!         rescue Exception
!         end
!         Process.exit!(1)
        end
      end
***************
*** 179,183 ****
        else
          # child
!         Kernel.exec(*cmd)
        end
      end
--- 185,195 ----
        else
          # child
!         begin
!           Kernel.exec(*cmd)
!         rescue Errno::ENOENT, Errno::EACCES
!           Process.exit!(127)
!         rescue Exception
!         end
!         Process.exit!(1)
        end
      end




More information about the bioruby-cvs mailing list