Class MessageUtil
java.lang.Object
com.github.oowekyala.ooxml.messages.MessageUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static XmlExceptioncreateEntryBestEffort(OoxmlFacade ooxml, XmlPositioner positioner, XmlSeverity severity, Throwable exception) Creates an entry for the given exception.(package private) static Stringprivate static StringextractKind(Throwable exception) (package private) static XmlPositionextractPosition(Throwable throwable) Tries to retrieve the position where the given exception occurred.private static StringextractSimpleMessage(Throwable exception) static StringheaderOnly(NiceXmlMessageSpec spec, String message, boolean singleLine) (package private) static String
-
Field Details
-
KIND_SCHEMA_VALIDATION
- See Also:
-
KIND_PARSING
- See Also:
-
-
Constructor Details
-
MessageUtil
MessageUtil()
-
-
Method Details
-
enquote
-
extractPosition
Tries to retrieve the position where the given exception occurred. This is a best-effort approach, trying several known exception types (egSAXParseException,TransformerException). -
createEntryBestEffort
static XmlException createEntryBestEffort(OoxmlFacade ooxml, XmlPositioner positioner, XmlSeverity severity, Throwable exception) Creates an entry for the given exception. Tries to recover the position from the exception.- Parameters:
exception- Exception- Returns:
- An exception, possibly enriched with context information
-
extractKind
-
extractSimpleMessage
-
readFully
- Throws:
IOException
-
headerOnly
-