MySQL 5.6.14 Source Code Document
|
Public Member Functions | |
void | displayRecognitionError (String[] tokenNames, RecognitionException e) |
void | reportError (RecognitionException e) |
String | getErrorHeader (RecognitionException e) |
String | getErrorMessage (RecognitionException e, String[] tokenNames) |
void | emitErrorMessage (String msg) |
boolean | hasErrors () |
List< RecognitionException > | getErrors () |
Generic ErrorListener for RecognitionExceptions. Enables client code to flexibly override error handling/presentation. Author: kroepke
Definition at line 30 of file ErrorListener.java.
void com.mysql.clusterj.jdbc.antlr.ErrorListener.displayRecognitionError | ( | String[] | tokenNames, |
RecognitionException | e | ||
) |
Called by reportError to display a recognition error. Normally it is sufficient to implement this method.
tokenNames | |
e |
Implemented in com.mysql.clusterj.jdbc.antlr.QueuingErrorListener.
void com.mysql.clusterj.jdbc.antlr.ErrorListener.emitErrorMessage | ( | String | msg | ) |
Redirects an error message to the appropriate place, relying on the other methods to actually produce a message
msg | Preformatted error message |
Implemented in com.mysql.clusterj.jdbc.antlr.QueuingErrorListener.
String com.mysql.clusterj.jdbc.antlr.ErrorListener.getErrorHeader | ( | RecognitionException | e | ) |
Generates a header line for error messages, normally containing source file and the position in the file where the error occured.
e |
String com.mysql.clusterj.jdbc.antlr.ErrorListener.getErrorMessage | ( | RecognitionException | e, |
String[] | tokenNames | ||
) |
Generates the message string for the actual error occured, must distinguish between the different RecognitionException subclasses.
e | |
tokenNames |
List<RecognitionException> com.mysql.clusterj.jdbc.antlr.ErrorListener.getErrors | ( | ) |
Retrieve the list of errors occurred.
Implemented in com.mysql.clusterj.jdbc.antlr.QueuingErrorListener, and com.mysql.clusterj.jdbc.antlr.BaseErrorListener.
boolean com.mysql.clusterj.jdbc.antlr.ErrorListener.hasErrors | ( | ) |
Check whether errors have occurred during recognition.
Implemented in com.mysql.clusterj.jdbc.antlr.BaseErrorListener, and com.mysql.clusterj.jdbc.antlr.QueuingErrorListener.
void com.mysql.clusterj.jdbc.antlr.ErrorListener.reportError | ( | RecognitionException | e | ) |
The main entry point for reporting recognition errors. Override only if you want to show "spurious" errors during recovery, too.
e | A runtime exception containing information about the error. |