diff options
Diffstat (limited to 'main/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyLoader.cs')
-rw-r--r-- | main/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyLoader.cs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/main/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyLoader.cs b/main/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyLoader.cs index c23bc5fc3f..71ebaa6b72 100644 --- a/main/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyLoader.cs +++ b/main/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyLoader.cs @@ -75,9 +75,14 @@ namespace MonoDevelop.AssemblyBrowser if (!File.Exists (fileName)) throw new ArgumentException ("File doesn't exist.", "fileName"); this.assemblyLoaderTask = Task.Factory.StartNew<AssemblyDefinition> (() => { - return AssemblyDefinition.ReadAssembly (FileName, new ReaderParameters () { - AssemblyResolver = this - }); + try { + return AssemblyDefinition.ReadAssembly (FileName, new ReaderParameters { + AssemblyResolver = this + }); + } catch (Exception e) { + LoggingService.LogError ("Error while reading assembly " + FileName, e); + return null; + } }, src.Token); this.unresolvedAssembly = new Lazy<IUnresolvedAssembly> (delegate { |