Class TokenMgrError
Token Manager Error.
Inheritance
Implements
Inherited Members
Namespace: Lucene.Net.QueryParsers.Flexible.Standard.Parser
Assembly: Lucene.Net.QueryParser.dll
Syntax
public class TokenMgrError : Exception, ISerializable
Constructors
| Improve this Doc View SourceTokenMgrError()
No arg constructor.
Declaration
public TokenMgrError()
TokenMgrError(Boolean, Int32, Int32, Int32, String, Char, Int32)
Full Constructor.
Declaration
public TokenMgrError(bool eofSeen, int lexState, int errorLine, int errorColumn, string errorAfter, char curChar, int reason)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | eofSeen | indicates if EOF caused the lexical error |
System.Int32 | lexState | lexical state in which this error occurred |
System.Int32 | errorLine | line number when the error occurred |
System.Int32 | errorColumn | column number when the error occurred |
System.String | errorAfter | prefix that was seen before this error occurred |
System.Char | curChar | the offending character |
System.Int32 | reason |
TokenMgrError(String, Int32)
Constructor with message and reason.
Declaration
public TokenMgrError(string message, int reason)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | |
System.Int32 | reason |
Properties
| Improve this Doc View SourceMessage
You can also modify the body of this method to customize your error messages. For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not of end-users concern, so you can return something like :
"Internal Error : Please file a bug report .... "
from this method for such cases in the release version of your parser.
Declaration
public override string Message { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
Methods
| Improve this Doc View SourceAddEscapes(String)
Replaces unprintable characters by their escaped (or unicode escaped) equivalents in the given string
Declaration
protected static string AddEscapes(string str)
Parameters
Type | Name | Description |
---|---|---|
System.String | str |
Returns
Type | Description |
---|---|
System.String |
LexicalError(Boolean, Int32, Int32, Int32, String, Char)
Returns a detailed message for the Error when it is thrown by the token manager to indicate a lexical error.
Declaration
protected static string LexicalError(bool eofSeen, int lexState, int errorLine, int errorColumn, string errorAfter, char curChar)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | eofSeen | indicates if EOF caused the lexical error |
System.Int32 | lexState | lexical state in which this error occurred |
System.Int32 | errorLine | line number when the error occurred |
System.Int32 | errorColumn | column number when the error occurred |
System.String | errorAfter | prefix that was seen before this error occurred |
System.Char | curChar | the offending character |
Returns
Type | Description |
---|---|
System.String |
Remarks
Note: You can customize the lexical error message by modifying this method.