public class ModelException extends RuntimeException
Constructor and Description |
---|
ModelException(String message)
Creates a new instance of
ModelException . |
ModelException(String message,
Throwable cause)
Creates a new instance of
ModelException . |
Modifier and Type | Method and Description |
---|---|
static void |
test(boolean condition,
String errorMessage,
Object... parameters)
Throws a
ModelException if the given condition is not met. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public ModelException(String message)
ModelException
.message
- the message of the exceptionpublic ModelException(String message, Throwable cause)
ModelException
.message
- the detail message of the exceptioncause
- the origin of this exceptionpublic static void test(boolean condition, String errorMessage, Object... parameters)
ModelException
if the given condition is not met.condition
- the condition to checkerrorMessage
- the message to include in the exception, if the condition is not true
, each of {}
is replaced by one of the given parametersparameters
- the optional parameters for the error messageModelException
- if the condition is false
Copyright © 2016 fastnate.org. All rights reserved.