diff options
Diffstat (limited to 'src/ParsingException.cs')
| -rw-r--r-- | src/ParsingException.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/ParsingException.cs b/src/ParsingException.cs new file mode 100644 index 00000000..e3bd51c9 --- /dev/null +++ b/src/ParsingException.cs @@ -0,0 +1,20 @@ +using System; + +namespace Crow.Coding +{ + public class ParserException : Exception + { + public int Line; + public int Column; + public ParserException(int line, int column, string txt) + : base(string.Format("Parser exception ({0},{1}): {2}", line, column, txt)) + { + Line = line; + Column = column; + } + public ParserException(int line, int column, string txt, Exception innerException) + : base(string.Format("Parser exception ({0},{1}): {2}", line, column, txt), innerException) + {} + } +} + |