Utility class for Logging errors while scanning and then produce formated error output in various forms.
If the error is logged via one of the Scanners then the ScriptSegment and position is logged by the scanner.
Error output has the following basic form:
Sample Error // Error Heading
FuncName(prm1, 'prm2') sample body } // ScriptSegment
-------------------------^(Ln: 1 Ch: 26) // Error position in segment
Filename: C:\somefilename.txt // Error File name (if defined)
Parse error: { expected // Error Context : Error Message
Members | Description |
---|---|
Properties: | |
P: bool IsError |
Get/Set Error status. |
P: string ErrorMessage |
Get/Set Error message. |
P: string ErrorContext |
Get/Set Error context. |
P: string ScriptSegment |
Get/Set Error script segment (if applicable). |
P: string ErrorFileName |
Get/Set the Error filename: - For certain situations it may be convenient to record a filename with an error when processing multiple files. - In the above case: the ErrorFileName may be set and is then associated with any subsequent error, until it is changed. |
P: int Ln |
Get/Set Error line number in a script (1..n). |
P: int Col |
Get/Set Error column number (1..n). |