k3 icon indicating copy to clipboard operation
k3 copied to clipboard

A unique exception should be thrown when an invariant is violated

Open tdegueul opened this issue 10 years ago • 0 comments

In @Contracted, invariants and pre/postconditions checks are currently mixed. Thus, a violated invariant will result in either a PreConditionViolationException or PostConditionViolationException, depending on whether the violation occurs when calling or exiting a given method.

@Contracted should check invariants separately and throw an appropriate InvariantViolationException.

tdegueul avatar Apr 24 '14 21:04 tdegueul