Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit 19017ee

Browse files
committed
Fix #401: SD fails to start when using "load previous solution on startup" and the solution load fails with an unhandled exception.
1 parent d307bf8 commit 19017ee

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/Main/SharpDevelop/Workbench/WorkbenchStartup.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,12 @@ public void Run(IList<string> fileList)
132132
// load previous solution
133133
if (!didLoadSolutionOrFile && SD.PropertyService.Get("SharpDevelop.LoadPrevProjectOnStartup", false)) {
134134
if (SD.FileService.RecentOpen.RecentProjects.Count > 0) {
135-
SD.ProjectService.OpenSolutionOrProject(SD.FileService.RecentOpen.RecentProjects[0]);
136-
didLoadSolutionOrFile = true;
135+
try {
136+
SD.ProjectService.OpenSolutionOrProject(SD.FileService.RecentOpen.RecentProjects[0]);
137+
didLoadSolutionOrFile = true;
138+
} catch (Exception ex) {
139+
MessageService.ShowException(ex);
140+
}
137141
}
138142
}
139143

0 commit comments

Comments
 (0)