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(GetMessage(message, position),
14 message,
15 position
16 ) { }
17
18
25 protected BadParseException(string message, BadSourcePosition position, Exception inner) :
26 base(GetMessage(message, position),
27 message,
28 position,
29 inner
30 ) { }
31
32
39 private static string GetMessage(string message, BadSourcePosition position)
40 {
41 return $"{message} at {position.GetExcerpt(10, 10)} in {position.GetPositionInfo()}";
42 }
43}
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.