Top Description Fields Constructors Methods
com.fasterxml.aalto

public Class ValidationException

extends XMLValidationException
Class Inheritance
Annotations
@SuppressWarnings:serial
Imports
javax.xml.stream.Location, .XMLStreamException, org.codehaus.stax2.validation.XMLValidationException, .XMLValidationProblem

Specific exception thrown when document has validation (DTD, W3C Schema) errors; things that are not well-formedness problems.

The current implementation does not add much beyond basic XMLValidationException, except for fixing some problems that underlying XMLStreamException has.

Note that some of the code is shared with other sub-classes. Unfortunately it is not possible to extend it, since they extend XMLStreamException, not XMLValidationException.

Field Summary

Inherited from org.codehaus.stax2.validation.XMLValidationException:
mCause

Constructor Summary

AccessConstructor and Description
protected
protected

Method Summary

Modifier and TypeMethod and Description
public static ValidationException
protected String
public String
getMessage()

Overrides java.lang.Throwable.getMessage.

Method is overridden for two main reasons: first, default method does not display public/system id information, even if it exists, and second, default implementation can not handle nested Location information.
public String
toString()

Overrides java.lang.Throwable.toString.

Returns a short description of this throwable.
Inherited from org.codehaus.stax2.validation.XMLValidationException:
createExceptiongetValidationProblemthrowMissing

Constructor Detail

ValidationExceptionback to summary
protected ValidationException(XMLValidationProblem cause, String msg)
ValidationExceptionback to summary
protected ValidationException(XMLValidationProblem cause, String msg, Location loc)

Method Detail

createback to summary
public static ValidationException create(XMLValidationProblem cause)
getLocationDescback to summary
protected String getLocationDesc()
getMessageback to summary
public String getMessage()

Overrides java.lang.Throwable.getMessage.

Method is overridden for two main reasons: first, default method does not display public/system id information, even if it exists, and second, default implementation can not handle nested Location information.

Returns:String

Doc from java.lang.Throwable.getMessage.

the detail message string of this Throwable instance (which may be null).

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Throwable.toString.

Doc from java.lang.Throwable.toString.

Returns a short description of this throwable. The result is the concatenation of:

  • the name of the class of this object
  • ": " (a colon and a space)
  • the result of invoking this object's getLocalizedMessage method
If getLocalizedMessage returns null, then just the class name is returned.
Returns:String

a string representation of this throwable.

Annotations
@Override