diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-03-09 15:37:09 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-03-09 15:37:09 +0100 |
| commit | 6ddcd449a085f7fa43d7f1176c47e62a3597c9ef (patch) | |
| tree | cdb2a6a689c468b28dc5b9a3cbde25077d94cc77 /src/ParsingException.cs | |
| parent | b4347f1bf30a103a85fff5b8517fcea99ee94273 (diff) | |
editor abstract base class, svgeditor base
Diffstat (limited to 'src/ParsingException.cs')
| -rw-r--r-- | src/ParsingException.cs | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/ParsingException.cs b/src/ParsingException.cs index eb85504d..1b596981 100644 --- a/src/ParsingException.cs +++ b/src/ParsingException.cs @@ -6,15 +6,25 @@ namespace Crow.Coding { public int Line; public int Column; + public string Source; public ParserException(int line, int column, string txt, string source = null) - : base(string.Format("{3}:({0},{1}): {2}", line, column, txt, source)) + : base(txt) { Line = line; Column = column; + Source = source; } public ParserException(int line, int column, string txt, Exception innerException, string source = null) - : base(string.Format("{3}:({0},{1}): {2}", line, column, txt, source), innerException) - {} + : base(txt, innerException) + { + Line = line; + Column = column; + Source = source; + } + public override string ToString () + { + return string.Format("{3}:({0},{1}): {2}", Line, Column, Message, Source); + } } } |