Class XmlParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.libxmq.imp.xml.XmlParseException
- All Implemented Interfaces:
Serializable
Thrown when xml cannot be parsed. The message is formatted like the
libxml2 error output, ie:
file.xml:1: parser error : Entity 'foo' not defined
<a>&foo;</a>
^
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionXmlParseException(byte[] full, String error, int line) Create an exception from a message formatted as bytes.XmlParseException(String full, String error, int line) Create an exception. -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
line
public final int lineThe line where the error was found, starting at 1. -
error
The error message without the source context. -
bytes
public final byte[] bytesThe full formatted message as bytes, print these to get exactly the C output.
-
-
Constructor Details
-
XmlParseException
-
XmlParseException
Create an exception from a message formatted as bytes. Like the C version the source context is cut at a byte position, which can split a UTF-8 character.- Parameters:
full- The full formatted message, with the source context.error- The error message itself.line- The line number.
-
-
Method Details
-
print
public void print()Print the message bytes unchanged to stderr.
-