mirror of
https://github.com/Stone-Red-Code/YesNt-Interpreter.git
synced 2026-09-09 07:56:06 +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);
|
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