Skip to content
This repository was archived by the owner on Sep 4, 2024. It is now read-only.

Commit ecb7dd9

Browse files
committed
Don't swallow scan exceptions
1 parent bc9f7f8 commit ecb7dd9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Mono.Addins/Mono.Addins.Database/AddinDatabase.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,7 @@ void RunScannerProcess (IProgressStatus monitor)
11691169
// If the process has crashed, try to do a new scan, this time using verbose log,
11701170
// to give the user more information about the origin of the crash.
11711171
if (pex != null && !retry) {
1172-
monitor.ReportError ("Add-in scan operation failed. The Mono runtime may have encountered an error while trying to load an assembly.", null);
1172+
monitor.ReportError ("Add-in scan operation failed. The runtime may have encountered an error while trying to load an assembly.", null);
11731173
if (monitor.LogLevel <= 1) {
11741174
// Re-scan again using verbose log, to make it easy to find the origin of the error.
11751175
retry = true;
@@ -1179,7 +1179,8 @@ void RunScannerProcess (IProgressStatus monitor)
11791179
retry = false;
11801180

11811181
if (!retry) {
1182-
monitor.ReportError ("Add-in scan operation failed", (ex is ProcessFailedException ? null : ex));
1182+
var pfex = ex as ProcessFailedException;
1183+
monitor.ReportError ("Add-in scan operation failed", pfex != null? pfex.InnerException : ex);
11831184
monitor.Cancel ();
11841185
return;
11851186
}

0 commit comments

Comments
 (0)