public class ModelValidationException extends ModelException
Modifier and Type | Field and Description |
---|---|
static int |
ERROR
Constant representing an error.
|
static int |
WARNING
Constant representing a warning.
|
Constructor and Description |
---|
ModelValidationException()
Creates new
ModelValidationException of type ERROR
without a detail message and with null as the
offending object. |
ModelValidationException(int errorType,
Object offendingObject,
String msg)
Constructs a
ModelValidationException of the specified
type with the specified detail message and offending object. |
ModelValidationException(Object offendingObject)
Constructs a
ModelValidationException of type
ERROR with the specified offending object and no
detail message. |
ModelValidationException(Object offendingObject,
String msg)
Constructs a
ModelValidationException of type
ERROR with the specified detail message and offending
object. |
ModelValidationException(String msg)
Constructs a
ModelValidationException of type
ERROR with the specified detail message and
null as the offending object. |
Modifier and Type | Method and Description |
---|---|
String |
getMessage()
Returns the error message string of this throwable object.
|
protected static ResourceBundle |
getMessages() |
Object |
getOffendingObject()
Get the offending object -- the one being validated when the problem
occurred.
|
int |
getType()
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public static final int ERROR
public static final int WARNING
public ModelValidationException()
ModelValidationException
of type ERROR
without a detail message and with null
as the
offending object.public ModelValidationException(String msg)
ModelValidationException
of type
ERROR
with the specified detail message and
null
as the offending object.msg
- the detail message.public ModelValidationException(Object offendingObject)
ModelValidationException
of type
ERROR
with the specified offending object and no
detail message.offendingObject
- the offending object.public ModelValidationException(Object offendingObject, String msg)
ModelValidationException
of type
ERROR
with the specified detail message and offending
object.offendingObject
- the offending object.msg
- the detail message.protected static final ResourceBundle getMessages()
public Object getOffendingObject()
public int getType()
public String getMessage()
getMessage
in class Throwable
ModelValidationException
, prepended with the warning string
if the type is WARNING
Copyright © 2020. All rights reserved.