public class InvariantError extends ContractAssertionError
Invariant,
Serialized Form| Constructor and Description |
|---|
InvariantError(java.lang.String msg)
Constructs a new InvariantError.
|
InvariantError(java.lang.String msg,
java.lang.Throwable throwable)
Constructs a new InvariantError.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getMethodName(java.lang.String contractedName)
Returns the method name to show in the stack trace instead of the
generated method name for the contract.
|
getMessagespublic InvariantError(java.lang.String msg)
msg - the error message.public InvariantError(java.lang.String msg,
java.lang.Throwable throwable)
msg - the error message.throwable - the throwable caught while evaluating contracts, or null
for none.protected java.lang.String getMethodName(java.lang.String contractedName)
ContractAssertionErrorgetMethodName in class ContractAssertionError