mirror of
https://github.com/Stone-Red-Code/YesNt-Interpreter.git
synced 2026-09-04 09:06:41 +02:00
- Add custom exceptions
This commit is contained in:
@@ -165,5 +165,17 @@ namespace YesNt.Interpreter.Statements
|
||||
|
||||
RuntimeInfo.Exit("Planned termination by code. Canceling all tasks", true);
|
||||
}
|
||||
|
||||
[Statement("trw", SearchMode.StartOfLine, SpaceAround.End, ConsoleColor.Red)]
|
||||
public void Throw(string message)
|
||||
{
|
||||
RuntimeInfo.Exit(message, true);
|
||||
}
|
||||
|
||||
[Statement("err", SearchMode.StartOfLine, SpaceAround.End, ConsoleColor.Red)]
|
||||
public void Error(string message)
|
||||
{
|
||||
RuntimeInfo.Exit(message, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user