Package com.ctc.wstx.exc
Class WstxValidationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- javax.xml.stream.XMLStreamException
-
- org.codehaus.stax2.validation.XMLValidationException
-
- com.ctc.wstx.exc.WstxValidationException
-
- All Implemented Interfaces:
Serializable
public class WstxValidationException extends org.codehaus.stax2.validation.XMLValidationException
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 underlyingXMLStreamException
has.Note that some of the code is shared with
WstxException
. Unfortunately it is not possible to extend it, however, since it extends basicXMLStreamException
, notXMLValidationException
.One more thing to note: unlike some other exception classes, these exceptions do not have chained root causes. That's why no special handling is necessary for setting the root cause in backwards compatible way.
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.xml.stream.XMLStreamException
location, nested
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
WstxValidationException(org.codehaus.stax2.validation.XMLValidationProblem cause, String msg)
protected
WstxValidationException(org.codehaus.stax2.validation.XMLValidationProblem cause, String msg, Location loc)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WstxValidationException
create(org.codehaus.stax2.validation.XMLValidationProblem cause)
protected String
getLocationDesc()
String
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.String
toString()
-
Methods inherited from class org.codehaus.stax2.validation.XMLValidationException
createException, getValidationProblem, throwMissing
-
Methods inherited from class javax.xml.stream.XMLStreamException
getLocation, getNestedException
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Method Detail
-
create
public static WstxValidationException create(org.codehaus.stax2.validation.XMLValidationProblem cause)
-
getMessage
public String 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.- Overrides:
getMessage
in classThrowable
-
getLocationDesc
protected String getLocationDesc()
-
-