ruby-rdf / json-ld

Ruby JSON-LD reader/writer for RDF.rb
The Unlicense
232 stars 27 forks source link

JsonLdError now inherits from StandardError instead of Exception #31

Closed abrisse closed 7 years ago

abrisse commented 7 years ago

Signed-off-by: Aymeric Brisse aymeric.brisse@perfect-memory.com

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 88.522% when pulling 1aa2cfb70708618863a7581f09f5b36e7510a378 on PerfectMemory:standarderror into 7ef20b95f2f570c7d87d2705e23a829b37050d61 on ruby-rdf:develop.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 88.522% when pulling 1aa2cfb70708618863a7581f09f5b36e7510a378 on PerfectMemory:standarderror into 7ef20b95f2f570c7d87d2705e23a829b37050d61 on ruby-rdf:develop.

gkellogg commented 7 years ago

This seems reasonable, but what's the motivation?

abrisse commented 7 years ago

StandardError can be catched, Exception should not (see http://blog.honeybadger.io/ruby-exception-vs-standarderror-whats-the-difference/).

Sometimes you need a catch-all errors and want to use a begin ... rescue StandardError, which won't catch the JsonLdError.

gkellogg commented 7 years ago

I'm working on some other things as well, I should have a new release out soon including this.