зеркало из https://github.com/microsoft/BuildXL.git
Merged PR 753272: Catch and log all exceptions in BxlAnalyzer
Currently we only catch / log only InvalidArgumentException that we throw when user provided incorrect arguments, and we rely on individual analyzers to catch any other exceptions that occur during their invocation. We've observed cases where the unobserved exceptions were not properly handled by the calller of an analyzer. This PR expands the outer try/catch, so we always process / log the exception (mainly to facilitate future debugging). Related work items: #2116741
This commit is contained in:
Родитель
16fb2cb0c1
Коммит
0d797a5da7
|
@ -3,6 +3,7 @@
|
|||
|
||||
using System;
|
||||
using BuildXL.ToolSupport;
|
||||
using BuildXL.Utilities.Core;
|
||||
|
||||
namespace BuildXL.Execution.Analyzer
|
||||
{
|
||||
|
@ -25,6 +26,10 @@ namespace BuildXL.Execution.Analyzer
|
|||
{
|
||||
Console.Error.WriteLine("Execution error: " + (e.InnerException ?? e).Message);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine($"An exception occurred during execution: {e.ToStringDemystified()}");
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче