Added exception handling to MindBlow

This commit is contained in:
RogueAI42 2017-06-17 19:45:21 +10:00
parent dbf794c984
commit 0365b33993

View file

@ -160,8 +160,15 @@ namespace ShiftOS.WinForms.Applications
{
new Thread(() =>
{
Interpreter.Reset();
Interpreter.Execute(programinput.Text);
try
{
Interpreter.Reset();
Interpreter.Execute(programinput.Text);
}
catch (Exception ex)
{
Desktop.InvokeOnWorkerThread(() => Infobox.Show("Program Error", "An error occurred while executing your program: " + ex.GetType().ToString()));
}
}).Start();
}