| java.lang.Object java.lang.Throwable java.lang.Exception net.percederberg.grammatica.GrammarException
GrammarException | public class GrammarException extends Exception (Code) | | A grammar validation exception. This exception is used for
signalling an error in the grammar file.
author: Per Cederberg, version: 1.0 |
GrammarException | public GrammarException(String file, String message)(Code) | | Creates a new grammar exception.
Parameters: file - the grammar file name Parameters: message - the detailed error message |
GrammarException | public GrammarException(String file, String message, int startLine, int endLine)(Code) | | Creates a new grammar exception.
Parameters: file - the grammar file name Parameters: message - the detailed error message Parameters: startLine - the starting line number, or -1 for unknown Parameters: endLine - the ending line number, or -1 for unknown |
getEndLine | public int getEndLine()(Code) | | Returns the end line number for the error.
the ending line number, or -1 if unknown |
getErrorMessage | public String getErrorMessage()(Code) | | Returns the error message.
the error message. |
getFile | public String getFile()(Code) | | Returns the grammar file name.
the grammar file name |
getMessage | public String getMessage()(Code) | | Returns the detailed error message. This message will contain
the same string as getErrorMessage(), but with line number
information appended.
the detailed error message |
getStartLine | public int getStartLine()(Code) | | Returns the start line number for the error.
the starting line number, or -1 if unknown |
|
|