From ecb7dd95e5c9f35ff84d04f7b3a70e1f4f8095e8 Mon Sep 17 00:00:00 2001 From: Michael Hutchinson Date: Wed, 19 Nov 2014 16:32:18 -0500 Subject: [PATCH] Don't swallow scan exceptions --- Mono.Addins/Mono.Addins.Database/AddinDatabase.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Mono.Addins/Mono.Addins.Database/AddinDatabase.cs b/Mono.Addins/Mono.Addins.Database/AddinDatabase.cs index 80db3db1..5f3a6ff7 100644 --- a/Mono.Addins/Mono.Addins.Database/AddinDatabase.cs +++ b/Mono.Addins/Mono.Addins.Database/AddinDatabase.cs @@ -1169,7 +1169,7 @@ void RunScannerProcess (IProgressStatus monitor) // If the process has crashed, try to do a new scan, this time using verbose log, // to give the user more information about the origin of the crash. if (pex != null && !retry) { - monitor.ReportError ("Add-in scan operation failed. The Mono runtime may have encountered an error while trying to load an assembly.", null); + monitor.ReportError ("Add-in scan operation failed. The runtime may have encountered an error while trying to load an assembly.", null); if (monitor.LogLevel <= 1) { // Re-scan again using verbose log, to make it easy to find the origin of the error. retry = true; @@ -1179,7 +1179,8 @@ void RunScannerProcess (IProgressStatus monitor) retry = false; if (!retry) { - monitor.ReportError ("Add-in scan operation failed", (ex is ProcessFailedException ? null : ex)); + var pfex = ex as ProcessFailedException; + monitor.ReportError ("Add-in scan operation failed", pfex != null? pfex.InnerException : ex); monitor.Cancel (); return; }