Permalink
Browse files

Catch ArgumentError when reading a URI in NTriples::Reader and transf…

…orm to ReaderError.
  • Loading branch information...
1 parent 43f3a42 commit 6181226b72df93881eeb6c06c813518d9adfa0fd @gkellogg gkellogg committed Apr 3, 2013
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/rdf/ntriples/reader.rb
View
2 lib/rdf/ntriples/reader.rb
@@ -289,6 +289,8 @@ def read_uriref(options = {})
uri.canonicalize! if canonicalize?
uri
end
+ rescue ArgumentError => e
+ raise RDF::ReaderError, "invalid URI"
end
##

0 comments on commit 6181226

Please sign in to comment.