envlang-csharp/Exceptions.cs
Suzanne Soy de12594067 WIP
2020-09-01 06:41:07 +00:00

25 lines
797 B
C#

using System;
public abstract class UserErrorException : Exception {
public UserErrorException(string e) : base(e) {}
}
public class ParserErrorException : UserErrorException {
public ParserErrorException(string e) : base("Parser error: " + e) {}
}
public class ParserExtensionException : UserErrorException {
public ParserExtensionException(string e) : base("Parser extension error: " + e) {}
}
public class LexerErrorException : UserErrorException {
public LexerErrorException(string e) : base("Lexer error: " + e) {}
}
public class RuntimeErrorException : UserErrorException {
public RuntimeErrorException(string e) : base("Runtime error: " + e) {}
}
public class TestFailedException : UserErrorException {
public TestFailedException(string e) : base("Test failed: " + e) {}
}