|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception org.wsmo.wsml.ParserException
public class ParserException
This is a checked exception thrown when the stream being parsed contains syntax errors or is invalid w.r.t. the predefined grammar
Field Summary | |
---|---|
static String |
ANONYMOUS_ID_AS_ATOM
|
static String |
FUNCTION_SYMBOL_AS_ATOM
|
static String |
NAMESPACE_PREFIX_NOT_FOUND
|
static String |
NB_ANONYMOUS_ID_AS_ATOM
|
static String |
NO_NAMESPACE
|
static String |
NOT_VALID_PARSETREE
|
static String |
VALUE_AS_ATOM
|
static String |
VARIABLE_AS_ATOM
|
static String |
WRONG_ARG_SIMPLE_DT
|
Constructor Summary | |
---|---|
ParserException(String msg,
Throwable cause)
Creates a Parser Exception indicating a problem found when processing an InputStream. |
Method Summary | |
---|---|
int |
getErrorLine()
Indicates the line where the parsing error occured. |
int |
getErrorPos()
inicates the position where the parsing error occured. |
String |
getExpectedToken()
Indicates which token was expecting when parsing error occured |
String |
getFoundToken()
returns the token that was expected. |
String |
getMessage()
Returns human readable description of error. |
void |
setErrorLine(int line)
Sets the line where the error occured. |
void |
setErrorPos(int pos)
sets the position (column) where the error occured. |
void |
setExpectedToken(String token)
sets the token that was expected when parsing error occured. |
void |
setFoundToken(String token)
set the token that was found during parsing. |
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 |
Field Detail |
---|
public static final String NO_NAMESPACE
public static final String NAMESPACE_PREFIX_NOT_FOUND
public static final String NOT_VALID_PARSETREE
public static final String ANONYMOUS_ID_AS_ATOM
public static final String NB_ANONYMOUS_ID_AS_ATOM
public static final String VALUE_AS_ATOM
public static final String FUNCTION_SYMBOL_AS_ATOM
public static final String VARIABLE_AS_ATOM
public static final String WRONG_ARG_SIMPLE_DT
Constructor Detail |
---|
public ParserException(String msg, Throwable cause)
msg
- message indicating the error that occured. Note
that this class appends some exta information (if given) like the
line and position of the error when "getMessage()" is called.cause
- the initial cause of the error. In case the
problem is caused by the underlying parser (e.g. sableCC it
will contain this ExceptionMethod Detail |
---|
public int getErrorLine()
public void setErrorLine(int line)
line
- where the error occured.public int getErrorPos()
public void setErrorPos(int pos)
pos
- of error.public String getFoundToken()
public void setFoundToken(String token)
token
- the token that was found during parsing.public String getExpectedToken()
public void setExpectedToken(String token)
token
- the toke that was expected when parsing error occured.public String getMessage()
getMessage
in class Throwable
Throwable.getMessage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |