Class TokenMgrError
Token Manager Error.
Inheritance
Implements
Inherited Members
Namespace: Lucene.Net.QueryParsers.Classic
Assembly: Lucene.Net.QueryParser.dll
Syntax
[Serializable]
public class TokenMgrError : Exception, ISerializable, IError
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 | |
System.Int32 | lexState | |
System.Int32 | errorLine | |
System.Int32 | errorColumn | |
System.String | errorAfter | |
System.Char | curChar | |
System.Int32 | reason |
TokenMgrError(SerializationInfo, StreamingContext)
Initializes a new instance of this class with serialized data.
Declaration
protected TokenMgrError(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | The System.Runtime.Serialization.SerializationInfo that holds the serialized object data about the exception being thrown. |
System.Runtime.Serialization.StreamingContext | context | The System.Runtime.Serialization.StreamingContext that contains contextual information about the source or destination. |
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 |
GetObjectData(SerializationInfo, StreamingContext)
Declaration
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | |
System.Runtime.Serialization.StreamingContext | context |
Overrides
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 | Detailed error message |
Remarks
You can customize the lexical error message by modifying this method.