Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLluis Sanchez <lluis@novell.com>2010-09-02 14:11:33 +0400
committerLluis Sanchez <lluis@novell.com>2010-09-02 14:11:33 +0400
commit083d5f0e9d665a016489577a1df849ae0b15ff50 (patch)
treefe7181d17dbef819c4087e37f80fe9050b94ba4a /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands
parent59d78443da2c6b35e93139c4763825b25334a28e (diff)
Avoid MD shutdown when there is an exception while running custom
commands.
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ProjectCommands.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ProjectCommands.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ProjectCommands.cs
index bccca94758..265fd5014d 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ProjectCommands.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ProjectCommands.cs
@@ -30,7 +30,7 @@
//
//
-
+using System;
using System.Threading;
using MonoDevelop.Core;
using MonoDevelop.Components.Commands;
@@ -464,7 +464,11 @@ namespace MonoDevelop.Ide.Commands
Thread t = new Thread (
delegate () {
using (monitor) {
- cmd.Execute (monitor, ce, IdeApp.Workspace.ActiveConfiguration);
+ try {
+ cmd.Execute (monitor, ce, IdeApp.Workspace.ActiveConfiguration);
+ } catch (Exception ex) {
+ monitor.ReportError (GettextCatalog.GetString ("Command execution failed"), ex);
+ }
}
}
);