gnu.text
Class SyntaxException
java.lang.Object
java.lang.Throwable
java.lang.Exception
gnu.text.SyntaxException
- All Implemented Interfaces:
- java.io.Serializable
public class SyntaxException
- extends java.lang.Exception
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:
- Serialized Form
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
maxToPrint
public int maxToPrint
SyntaxException
public SyntaxException(SourceMessages messages)
SyntaxException
public SyntaxException(java.lang.String header,
SourceMessages messages)
getHeader
public final java.lang.String getHeader()
- If non-null, an extra one-line message printed before the messages.
Can be used to provide extra context.
setHeader
public final void setHeader(java.lang.String header)
- Set the header returned by
getHeader
.
getMessages
public SourceMessages getMessages()
printAll
public void printAll(java.io.PrintWriter out,
int max)
clear
public void clear()
getMessage
public java.lang.String getMessage()
- Overrides:
getMessage
in class java.lang.Throwable