public class PreconditionError extends ContractAssertionError
Requires,
Serialized Form| Constructor and Description |
|---|
PreconditionError(java.lang.String msg,
PreconditionError cause)
Constructs a new PreconditionError.
|
PreconditionError(java.lang.String msg,
PreconditionError cause,
java.lang.Throwable throwable)
Constructs a new PreconditionError.
|
| 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 PreconditionError(java.lang.String msg,
PreconditionError cause)
msg - the error message.cause - a previously failing preconditionpublic PreconditionError(java.lang.String msg,
PreconditionError cause,
java.lang.Throwable throwable)
msg - the error message.cause - a previously failing preconditionthrowable - the throwable caught while evaluating contracts, or null
for none.protected java.lang.String getMethodName(java.lang.String contractedName)
ContractAssertionErrorgetMethodName in class ContractAssertionError