aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ShiftOS.WinForms/Applications/MindBlow.cs11
1 files changed, 9 insertions, 2 deletions
diff --git a/ShiftOS.WinForms/Applications/MindBlow.cs b/ShiftOS.WinForms/Applications/MindBlow.cs
index 22f5011..0f0df80 100644
--- a/ShiftOS.WinForms/Applications/MindBlow.cs
+++ b/ShiftOS.WinForms/Applications/MindBlow.cs
@@ -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();
}