BadScript 2
Loading...
Searching...
No Matches
BadParseException.cs
Go to the documentation of this file.
2
6public abstract class BadParseException : BadScriptException
7{
13 protected BadParseException(string message, BadSourcePosition position) : base(
14 GetMessage(message, position),
15 message,
16 position
17 ) { }
18
19
26 protected BadParseException(string message, BadSourcePosition position, Exception inner) : base(
27 GetMessage(message, position),
28 message,
29 position,
30 inner
31 ) { }
32
33
40 private static string GetMessage(string message, BadSourcePosition position)
41 {
42 return $"{message} at {position.GetExcerpt(10, 10)} in {position.GetPositionInfo()}";
43 }
44}
Base Class for all BadScript Parser Exceptions.
BadParseException(string message, BadSourcePosition position)
Constructor for the BadParseException.
static string GetMessage(string message, BadSourcePosition position)
Returns a string that represents the error message with the source position.
BadParseException(string message, BadSourcePosition position, Exception inner)
Constructor for the BadParseException.
The base class of all BadScript Exceptions.
Describes a specific position inside a source file.
Contains Shared Data Structures and Functionality.