- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.io7m.jaffirm.core.ContractException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
InvariantViolationException,PostconditionViolationException,PreconditionViolationException
public abstract class ContractException extends RuntimeException
One or more conditions have been violated.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedContractException(String message, int in_violations)Construct an exception.protectedContractException(String message, Throwable cause, int in_violations)Construct an exception.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intviolations()-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
ContractException
protected ContractException(String message, Throwable cause, int in_violations)
Construct an exception.- Parameters:
cause- The causemessage- The messagein_violations- The number of violated conditions
-
ContractException
protected ContractException(String message, int in_violations)
Construct an exception.- Parameters:
message- The messagein_violations- The number of violated conditions
-
-