Top Description Fields Constructors Methods
org.codehaus.stax2.validation

public Class XMLValidationException

extends XMLStreamException
Class Inheritance
Imports
javax.xml.stream.Location, .XMLStreamException

Specialized sub-class of XMLStreamException, to be used for indicating fatal validation problems (when in mode in which exceptions are to be thrown).

Note

constructors are protected, since direct instantiation should be done using factory methods. Reason for this is that the base XMLStreamException has less than robust handling of optional arguments, and thus factory methods of this class can take care to choose appropriate constructors to call, to make sure super-class does not barf (NPE or such).

Field Summary

Modifier and TypeField and Description
protected XMLValidationProblem
private static final long
Inherited from javax.xml.stream.XMLStreamException:
locationnested

Constructor Summary

AccessConstructor and Description
protected
protected
protected

Method Summary

Modifier and TypeMethod and Description
public static XMLValidationException
public XMLValidationProblem

Returns:

Object that has all information about details of the validation problem
getValidationProblem
()

protected static void
Inherited from javax.xml.stream.XMLStreamException:
getLocationgetNestedException

Field Detail

mCauseback to summary
protected XMLValidationProblem mCause
serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.xml.stream.XMLStreamException.serialVersionUID.

Constructor Detail

XMLValidationExceptionback to summary
protected XMLValidationException(XMLValidationProblem cause)
XMLValidationExceptionback to summary
protected XMLValidationException(XMLValidationProblem cause, String msg)
XMLValidationExceptionback to summary
protected XMLValidationException(XMLValidationProblem cause, String msg, Location loc)

Method Detail

createExceptionback to summary
public static XMLValidationException createException(XMLValidationProblem cause)
getValidationProblemback to summary
public XMLValidationProblem getValidationProblem()
Returns:XMLValidationProblem

Object that has all information about details of the validation problem

throwMissingback to summary
protected static void throwMissing() throws RuntimeException