description method
Get a standard description of this error, including type and location.
Implementation
String description() {
String desc = "Error: ";
if (this is LexerException) {
desc = "Lexer Error: ";
} else if (this is CompilerException) {
desc = "Compiler Error: ";
} else if (this is RuntimeException) {
desc = "Runtime Error: ";
}
desc += message;
if (location != null) desc += " $location";
return desc;
}