extend Error
for InvariantViolationException
instead of Exception
#308
Labels
Priority: Medium
This issue may be useful, and needs some attention.
Type: BC Break
A change that will result in a backward compatibility break in the public API.
Type: Enhancement
Most issues will probably ask for additions or changes.
Projects
Milestone
invariant violations should never be caught, as they indicate you are doing something wrong ( passing an empty array to an API that requests
non-empty-array
, or an negative number to an API that stats the parameter type ispositive-int
), therefor, these should be fixed before even calling the API, not by catching the violation.we should rename
InvariantViolationException
toInvariantViolation
, and extendError
instead.The text was updated successfully, but these errors were encountered: