javax.xml.bind
public class TypeConstraintException extends RuntimeException
This is a runtime exception. The desired use is for generated set methods which would like to indicate that the specified value is invalid, for example, because a facet restriction wasn't met.
If a generated setter throws a TypeConstraintException
,
then it is the JAXB providers task to ensure, that the object,
on which the setter is invoked, remains unchanged.
Since: JAXB1.0
Constructor Summary | |
---|---|
TypeConstraintException(String pMessage) Creates a new | |
TypeConstraintException(String pMessage, String pErrorCode) Creates a new | |
TypeConstraintException(Throwable pLinkedException) Creates a new | |
TypeConstraintException(String pMessage, Throwable pLinkedException) Creates a new | |
TypeConstraintException(String pMessage, String pErrorCode, Throwable pLinkedException) Creates a new |
Method Summary | |
---|---|
String | getErrorCode() Returns the vendor specific error code, if any, or null. |
Throwable | getLinkedException() Returns the linked exception, if any, or null. |
void | setLinkedException(Throwable pLinkedException) Sets the linked exception. |
String | toString() Converts the linked exception into a String. |
Creates a new TypeConstraintException
with the specified
detail message.
Parameters: pMessage The detail message.
Creates a new TypeConstraintException
with the specified
detail message and vendor specific error code.
Parameters: pMessage The detail message. pErrorCode The error code.
Creates a new TypeConstraintException
with the specified
linked exception.
Parameters: pLinkedException The linked exception.
Creates a new TypeConstraintException
with the specified
detail message and linked exception.
Parameters: pMessage The detail message. pLinkedException The linked exception.
Creates a new TypeConstraintException
with the specified
detail message, error code, and linked exception.
Parameters: pMessage The detail message. pErrorCode The vendor specific error code. pLinkedException The linked exception.
Returns the vendor specific error code, if any, or null.
Returns the linked exception, if any, or null.
Sets the linked exception.
Parameters: pLinkedException The linked exception or null.
Converts the linked exception into a String. Overridden, because the returned string should contain the vendor specific error code, if any.