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

Commit

Permalink
Don't swallow scan exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
mhutch committed Nov 19, 2014
1 parent bc9f7f8 commit ecb7dd9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Mono.Addins/Mono.Addins.Database/AddinDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down

0 comments on commit ecb7dd9

Please sign in to comment.