Class XmlException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.github.oowekyala.ooxml.messages.XmlException
- All Implemented Interfaces:
Serializable
Generic XML exception wrapper. Can occur during validation or parsing.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final XmlPositionprivate final XmlSeverityprivate final String -
Constructor Summary
ConstructorsConstructorDescriptionXmlException(NiceXmlMessageSpec spec, @Nullable String fullMessage) Create a new exception from the given spec. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Field Details
-
position
-
simpleMessage
-
kind
-
severity
-
-
Constructor Details
-
XmlException
Create a new exception from the given spec.- Parameters:
spec- A non-null specfullMessage- Used as thetoString(). If null, the spec'sNiceXmlMessageSpec.getSimpleMessage()is used.- Throws:
NullPointerException- If the spec is null
-
-
Method Details
-
getSimpleMessage
Returns the error message, without the surrounding line context.Throwable.getMessage()will return a fuller message. -
getPosition
Returns the position where the error occurred. This may be undefined. -
getKind
Returns the message kind. -
getSeverity
Returns the severity of the message. -
toString
-