Package gnu.text
Class SyntaxException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
gnu.text.SyntaxException
- All Implemented Interfaces:
Serializable
Used to signal a non-recoverable (fatal) syntax error.
Can also be used to signal a syntax error from embedded parsers,
such as an
eval
or execute
method,
or well-formedness errors when reading an XML document.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSyntaxException
(SourceMessages messages) SyntaxException
(String header, SourceMessages messages) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
final String
If non-null, an extra one-line message printed before the messages.void
printAll
(PrintWriter out, int max) final void
Set the header returned bygetHeader
.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
maxToPrint
public int maxToPrint
-
-
Constructor Details
-
SyntaxException
-
SyntaxException
-
-
Method Details
-
getHeader
If non-null, an extra one-line message printed before the messages. Can be used to provide extra context. -
setHeader
Set the header returned bygetHeader
. -
getMessages
-
printAll
-
clear
public void clear() -
getMessage
- Overrides:
getMessage
in classThrowable
-