diff options
| author | RogueAI42 <[email protected]> | 2017-06-17 19:45:21 +1000 |
|---|---|---|
| committer | RogueAI42 <[email protected]> | 2017-06-17 19:45:21 +1000 |
| commit | 0365b33993812361936e81104f793f58794fde8f (patch) | |
| tree | 6e3a594c9dbc21e7d3c778024ccecfad40dbcae6 /ShiftOS.WinForms/Applications | |
| parent | dbf794c9849c0046cf2e93a878c6d8d9101d2fc8 (diff) | |
| download | shiftos_thereturn-0365b33993812361936e81104f793f58794fde8f.tar.gz shiftos_thereturn-0365b33993812361936e81104f793f58794fde8f.tar.bz2 shiftos_thereturn-0365b33993812361936e81104f793f58794fde8f.zip | |
Added exception handling to MindBlow
Diffstat (limited to 'ShiftOS.WinForms/Applications')
| -rw-r--r-- | ShiftOS.WinForms/Applications/MindBlow.cs | 11 |
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(); } |
