org.codehaus.stax2.validation
Class XMLValidationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by javax.xml.stream.XMLStreamException
              extended by org.codehaus.stax2.validation.XMLValidationException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
WstxValidationException

public class XMLValidationException
extends javax.xml.stream.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).

See Also:
Serialized Form

Field Summary
protected  XMLValidationProblem mCause
           
 
Fields inherited from class javax.xml.stream.XMLStreamException
location, nested
 
Constructor Summary
protected XMLValidationException(XMLValidationProblem cause)
           
protected XMLValidationException(XMLValidationProblem cause, java.lang.String msg)
           
protected XMLValidationException(XMLValidationProblem cause, java.lang.String msg, javax.xml.stream.Location loc)
           
 
Method Summary
static XMLValidationException createException(XMLValidationProblem cause)
           
 XMLValidationProblem getValidationProblem()
           
protected static void throwMissing()
           
 
Methods inherited from class javax.xml.stream.XMLStreamException
getLocation, getNestedException
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mCause

protected XMLValidationProblem mCause
Constructor Detail

XMLValidationException

protected XMLValidationException(XMLValidationProblem cause)

XMLValidationException

protected XMLValidationException(XMLValidationProblem cause,
                                 java.lang.String msg)

XMLValidationException

protected XMLValidationException(XMLValidationProblem cause,
                                 java.lang.String msg,
                                 javax.xml.stream.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 java.lang.RuntimeException
Throws:
java.lang.RuntimeException