Browse Source

Observe assembly load exceptions so that we don't crash when the Task's finalizer kicks in. Closes #54.

pull/129/head
Daniel Grunwald 15 years ago
parent
commit
b84ca13f50
  1. 2
      ILSpy/TreeNodes/AssemblyTreeNode.cs

2
ILSpy/TreeNodes/AssemblyTreeNode.cs

@ -89,6 +89,8 @@ namespace ICSharpCode.ILSpy.TreeNodes @@ -89,6 +89,8 @@ namespace ICSharpCode.ILSpy.TreeNodes
RaisePropertyChanged("ExpandedIcon");
if (assemblyTask.IsFaulted) {
RaisePropertyChanged("ShowExpander"); // cannot expand assemblies with load error
// observe the exception so that the Task's finalizer doesn't re-throw it
try { assemblyTask.Wait(); } catch (AggregateException) {}
} else {
RaisePropertyChanged("Text"); // shortname might have changed
}

Loading…
Cancel
Save