net.scheinerman.phoenix.interpreter.exceptions
Class SyntaxException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
net.scheinerman.phoenix.interpreter.exceptions.PhoenixRuntimeException
net.scheinerman.phoenix.interpreter.exceptions.SyntaxException
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- IllegalArgumentException, IllegalIdentifierException, UnknownFunctionException
public class SyntaxException
- extends PhoenixRuntimeException
This is the root of all syntax based exceptions that can be thrown during Phoenix program execution.
Any program that has a syntax error in its code should throw an instance of this class or any of its
subclasses. This class allows for alternate messages to be passed in via the constructor. Thus,
depending on the instance that this exception is thrown, a different message might be displayed in the
output.
- Since:
- 1.5
- Version:
- 1.0
- Author:
- Jonah Scheinerman
- See Also:
PhoenixRuntimeException}
,
Serialized Form
Constructor Summary |
SyntaxException()
Creates a new SyntaxException with the default brief message "Generic syntax error." |
SyntaxException(java.lang.String briefMessage)
Creates a new SyntaxException with a user defined brief message. |
Method Summary |
java.lang.String |
getBriefMessage()
This returns the brief message for this exception. |
java.lang.String |
getErrorType()
This returns the error type for this exception which is always, "Syntax error" . |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
briefMessage
protected java.lang.String briefMessage
"Generic syntax error"
SyntaxException
public SyntaxException()
- Creates a new
SyntaxException
with the default brief message "Generic syntax error."
SyntaxException
public SyntaxException(java.lang.String briefMessage)
- Creates a new
SyntaxException
with a user defined brief message.
- Parameters:
briefMessage
- - What should be returned by a call to getBriefMessage()
.
getErrorType
public java.lang.String getErrorType()
- This returns the error type for this exception which is always,
"Syntax error"
.
- Overrides:
getErrorType
in class PhoenixRuntimeException
- Returns:
"Syntax error"
getBriefMessage
public java.lang.String getBriefMessage()
- This returns the brief message for this exception. If no message was passed to the constructor, the
result is the default phrase "Generic syntax error"
- Overrides:
getBriefMessage
in class PhoenixRuntimeException
- Returns:
- The user defined brief message or, if none,
"Generic syntax error"