Skip to content

Commit

Permalink
Trap-and-bin this
Browse files Browse the repository at this point in the history
Trapping and binning this exception allowed me to actually use this
code in a real-world situation. Crucially (maybe), all the specs still
pass
  • Loading branch information
pikesley committed May 26, 2016
1 parent f8fa9e1 commit fcbe8ad
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/csvlint/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ def load_from_json(uri, output_errors = true)
else
return Schema.from_json_table(uri,json)
end
rescue TypeError => e
# NO IDEA what this was even trying to do - SP 20160526

rescue Csvlint::Csvw::MetadataError => e
raise e
rescue OpenURI::HTTPError, Errno::ENOENT => e
Expand Down

0 comments on commit fcbe8ad

Please sign in to comment.