com.ctc.wstx.exc
public class WstxValidationException extends XMLValidationException
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 WstxException
. Unfortunately
it is not possible to extend it, however, since it extends basic
XMLStreamException
, not XMLValidationException
.
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.
mCause
Modifier | Constructor and Description |
---|---|
protected |
WstxValidationException(XMLValidationProblem cause,
java.lang.String msg) |
protected |
WstxValidationException(XMLValidationProblem cause,
java.lang.String msg,
javax.xml.stream.Location loc) |
Modifier and Type | Method and Description |
---|---|
static WstxValidationException |
create(java.lang.String msg,
javax.xml.stream.Location loc,
int severity) |
static WstxValidationException |
create(XMLValidationProblem cause) |
protected java.lang.String |
getLocationDesc() |
java.lang.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.
|
java.lang.String |
toString() |
createException, getValidationProblem, throwMissing
protected WstxValidationException(XMLValidationProblem cause, java.lang.String msg)
protected WstxValidationException(XMLValidationProblem cause, java.lang.String msg, javax.xml.stream.Location loc)
public static WstxValidationException create(java.lang.String msg, javax.xml.stream.Location loc, int severity)
public static WstxValidationException create(XMLValidationProblem cause)
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public java.lang.String toString()
toString
in class java.lang.Throwable
protected java.lang.String getLocationDesc()