Skip to content

Commit 92bbb14

Browse files
committed
Catch MultiJson parsing errors when loading documents.
1 parent dca1af1 commit 92bbb14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/json/ld/api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ def self.loadRemoteDocument(url,
632632
end
633633
block_given? ? yield(remote_doc) : remote_doc
634634
end
635-
rescue IOError => e
635+
rescue IOError, MultiJson::ParseError => e
636636
raise JSON::LD::JsonLdError::LoadingDocumentFailed, e.message
637637
end
638638

0 commit comments

Comments
 (0)