|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.ErrorHandler
public class ErrorHandler
The ErrorHandler class performs error handling.
| Field Summary | |
|---|---|
int |
LEX_ERROR
Lexical error constant - use to indicate the type of error |
int |
PARSE_ERROR
Parse error constant - use to indicate the type of error |
int |
SEMANT_ERROR
Semantic error constant - use to indicate the type of error |
| Constructor Summary | |
|---|---|
ErrorHandler()
|
|
| Method Summary | |
|---|---|
void |
checkErrors()
Check the errors - halts if there are any registered errors |
void |
register(int type,
java.lang.String errorMessage)
Register an error |
void |
register(int type,
java.lang.String filename,
int lineNum,
java.lang.String errorMessage)
Register an error |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final int LEX_ERROR
public final int PARSE_ERROR
public final int SEMANT_ERROR
| Constructor Detail |
|---|
public ErrorHandler()
| Method Detail |
|---|
public void register(int type,
java.lang.String filename,
int lineNum,
java.lang.String errorMessage)
type - the type (lex, parse, semantic) of errorfilename - the name of the filename where the error occurredlineNum - the starting line number in the source file where the error occurrederrorMessage - the error message
public void register(int type,
java.lang.String errorMessage)
type - the type (lex, parse, semantic) of errorerrorMessage - the error messagepublic void checkErrors()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||