Permalink
Browse files

Stack trace on --debug

  • Loading branch information...
1 parent a78c1db commit ac710e5cc0bc54abfd7ed76392609cbaff8c1b26 @pjotrp committed Feb 28, 2014
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/bio-table/validator.rb
@@ -4,8 +4,8 @@ module Validator
def Validator::valid_header? header, old_header
if old_header
if header - old_header != []
- p old_header
- p header
+ $stderr.print old_header,"\n"
+ $stderr.print header,"\n"
raise "Headers do not compare!"
end
end
@@ -15,8 +15,8 @@ def Validator::valid_header? header, old_header
def Validator::valid_row? line_number, fields, last_fields
return false if fields == nil or fields.size == 0
if last_fields and last_fields.size>0 and (fields.size != last_fields.size)
- $stderr.puts last_fields
- $stderr.puts fields
+ $stderr.print last_fields,"\n"
+ $stderr.print fields,"\n"
throw "Number of fields diverge in line #{line_number} (size #{fields.size}, expected #{last_fields.size})"
end
true

0 comments on commit ac710e5

Please sign in to comment.