Permalink
Browse files

Stack trace on --debug

  • Loading branch information...
1 parent c48b8d1 commit 6a67f09222ddbbf7743b3cb93d8e3fa444fc7915 @pjotrp committed Feb 28, 2014
Showing with 8 additions and 3 deletions.
  1. +7 −2 bin/bio-table
  2. +1 −1 lib/bio-table/tableload.rb
View
@@ -162,6 +162,7 @@ EOU
o.on("--debug", "Show debug messages") do |v|
Bio::Log::CLI.trace('debug')
+ options[:debug] = true
end
o.separator ""
@@ -282,6 +283,10 @@ EOU
statistics.write(writer) if statistics
rescue => msg
- $stderr.print "Error: ",msg
- exit 1
+ if options[:debug]
+ raise
+ else
+ $stderr.print "Error: ",msg
+ exit 1
+ end
end
@@ -9,7 +9,7 @@ module TableLoader
#
# Note that you need to pass in :with_header to get the header row
def TableLoader::emit generator, options = {}
- table_apply = TableApply.new(options)
+ table_apply = TableApply.new(options) # parser and filters
column_index = nil, prev_line = nil
skip = options[:skip]
skip = 0 if skip == nil

0 comments on commit 6a67f09

Please sign in to comment.