Class AlangFormatException
Represents an exception thrown when an error occurs during parsing of Alang expressions.
Implements
Inherited Members
Namespace: Automata.Core.Alang
Assembly: Automata.Core.dll
Syntax
[Serializable]
public class AlangFormatException : Exception, ISerializable
Remarks
Provides detailed information about the parsing error, including the index in the input where the error occurred and the specific type of error. All throwing of this exception is done in the AlangCursor class.
Fields
| Edit this page View SourceErrorReason
Type of parsing error that occurred.
Declaration
public readonly ParseErrorReason ErrorReason
Field Value
Type | Description |
---|---|
ParseErrorReason |
Index
Index in the input string where the parsing error occurred.
Declaration
public readonly int Index
Field Value
Type | Description |
---|---|
int |
Methods
| Edit this page View SourceAssert(bool, ParseErrorReason, int, string)
Conditionally throws an AlangFormatExceptioniff
condition
is false.
Declaration
public static bool Assert(bool condition, ParseErrorReason errorReason, int index, string message)
Parameters
Type | Name | Description |
---|---|---|
bool | condition |
|
ParseErrorReason | errorReason | Reason for the parsing error. |
int | index | Index in the input string where the parsing error occurred. |
string | message | Error message with details about the exception. |
Returns
Type | Description |
---|---|
bool | true or throws exception. |