From f3999228f2b5d91b4fa0c496165d4b893dac5548 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Fri, 7 May 2010 08:57:28 +0000 Subject: [PATCH] Handle ProjectStartException when starting project with profiler. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@5772 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Misc/Profiler/Frontend/AddIn/Src/ProfilerRunner.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/ProfilerRunner.cs b/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/ProfilerRunner.cs index 7696b555f3..a0d631ebc5 100644 --- a/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/ProfilerRunner.cs +++ b/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/ProfilerRunner.cs @@ -135,7 +135,14 @@ namespace ICSharpCode.Profiler.AddIn return null; } - ProfilerRunner runner = new ProfilerRunner(currentProj.CreateStartInfo(), true, writer); + ProcessStartInfo startInfo; + try { + startInfo = currentProj.CreateStartInfo(); + } catch (ProjectStartException ex) { + MessageService.ShowError(ex.Message); + return null; + } + ProfilerRunner runner = new ProfilerRunner(startInfo, true, writer); return runner; }