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 with null as the offending object and
no detail message. |
ModelValidationException(int errorType,
java.lang.Object offendingObject,
java.lang.String message)
Constructs a
ModelValidationException of the specified
type with the specified detail message and offending object. |
ModelValidationException(java.lang.Object offendingObject)
Constructs a
ModelValidationException of type
ERROR with the specified offending object and no
detail message. |
ModelValidationException(java.lang.Object offendingObject,
java.lang.String message)
Constructs a
ModelValidationException of type
ERROR with the specified offending object and detail
message . |
ModelValidationException(java.lang.String message)
Constructs a
ModelValidationException of type
ERROR with null as the offending object and
with the specified detail message. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getMessage()
Returns the error message string of this throwable object.
|
java.lang.Object |
getOffendingObject()
Get the offending object -- the one being validated when the problem
occurred.
|
int |
getType()
|
java.lang.String |
toString()
The
String representation includes the name of the class,
the descriptive comment (if any),
and the String representation of the cause (if any). |
getCause, initCause, printStackTrace, printStackTrace, printStackTrace
public static final int ERROR
public static final int WARNING
public ModelValidationException()
ModelValidationException
of type
ERROR
with null
as the offending object and
no detail message.public ModelValidationException(java.lang.String message)
ModelValidationException
of type
ERROR
with null
as the offending object and
with the specified detail message.message
- the detail message.public ModelValidationException(java.lang.Object offendingObject)
ModelValidationException
of type
ERROR
with the specified offending object and no
detail message.offendingObject
- the offending object.public ModelValidationException(java.lang.Object offendingObject, java.lang.String message)
ModelValidationException
of type
ERROR
with the specified offending object and detail
message .offendingObject
- the offending object.message
- the detail message.public ModelValidationException(int errorType, java.lang.Object offendingObject, java.lang.String message)
ModelValidationException
of the specified
type with the specified detail message and offending object.public java.lang.Object getOffendingObject()
public int getType()
public java.lang.String getMessage()
getMessage
in class ModelException
ModelValidationException
, prepended with the warning string
if the type is WARNING
public java.lang.String toString()
String
representation includes the name of the class,
the descriptive comment (if any),
and the String
representation of the cause (if any).toString
in class ModelException
String
.Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.