Browse Source

Ignore errors when loading the view content mementos from LastViewStates.xml (may happen after low disk space condition, see http://community.sharpdevelop.net/forums/t/8592.aspx).

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3647 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Christian Hornung 17 years ago
parent
commit
7ec74630f8
  1. 7
      src/Main/Base/Project/Src/Gui/Workbench/DefaultWorkbench.cs

7
src/Main/Base/Project/Src/Gui/Workbench/DefaultWorkbench.cs

@ -427,7 +427,12 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -427,7 +427,12 @@ namespace ICSharpCode.SharpDevelop.Gui
Properties LoadOrCreateViewContentMementos()
{
return Properties.Load(this.ViewContentMementosFileName) ?? new Properties();
try {
return Properties.Load(this.ViewContentMementosFileName) ?? new Properties();
} catch (Exception ex) {
LoggingService.Warn("Error while loading the view content memento file. Discarding any saved view states.", ex);
return new Properties();
}
}
static string GetMementoKeyName(IViewContent viewContent)

Loading…
Cancel
Save