Package org.codehaus.stax2.validation
Class XMLValidationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- javax.xml.stream.XMLStreamException
-
- org.codehaus.stax2.validation.XMLValidationException
-
- All Implemented Interfaces:
Serializable
public class XMLValidationException extends XMLStreamException
Specialized sub-class ofXMLStreamException, 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
XMLStreamExceptionhas 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).- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected XMLValidationProblemmCause-
Fields inherited from class javax.xml.stream.XMLStreamException
location, nested
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedXMLValidationException(XMLValidationProblem cause)protectedXMLValidationException(XMLValidationProblem cause, String msg)protectedXMLValidationException(XMLValidationProblem cause, String msg, Location loc)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static XMLValidationExceptioncreateException(XMLValidationProblem cause)XMLValidationProblemgetValidationProblem()protected static voidthrowMissing()-
Methods inherited from class javax.xml.stream.XMLStreamException
getLocation, getNestedException
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
mCause
protected XMLValidationProblem mCause
-
-
Constructor Detail
-
XMLValidationException
protected XMLValidationException(XMLValidationProblem cause)
-
XMLValidationException
protected XMLValidationException(XMLValidationProblem cause, String msg)
-
XMLValidationException
protected XMLValidationException(XMLValidationProblem cause, String msg, Location loc)
-
-
Method Detail
-
createException
public static XMLValidationException createException(XMLValidationProblem cause)
-
getValidationProblem
public XMLValidationProblem getValidationProblem()
- Returns:
- Object that has all information about details of the validation problem
-
throwMissing
protected static void throwMissing() throws RuntimeException- Throws:
RuntimeException
-
-