Changes all the places in the library where we raise generic errors to
typed errors. These fall into two categories:
When appropriate, I've tried to raise ArgumentError.
Otherwise, I've defined a JsonSchema::Error from which all other
thrown errors are inherited. The bang methods (expand!, parse!,
and validate!) throw a new JsonSchema::AggregateError instead of
just a RuntimeError with some strings concatenated. The new error is
still a descendant of RuntimeError so this isn't a breaking change.
Changes all the places in the library where we raise generic errors to typed errors. These fall into two categories:
ArgumentError
.JsonSchema::Error
from which all other thrown errors are inherited. The bang methods (expand!
,parse!
, andvalidate!
) throw a newJsonSchema::AggregateError
instead of just aRuntimeError
with some strings concatenated. The new error is still a descendant ofRuntimeError
so this isn't a breaking change.Fixes #49.