135 references to ExceptionHandling
Microsoft.Build (120)
BackEnd\BuildManager\BuildManager.cs (13)
1354catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 1427catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 1436catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 1573ExceptionHandling.DumpExceptionToFile(e); 1827catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 1900return !ExceptionHandling.IsCriticalException(e) && !ExceptionHandling.NotExpectedException(e) && e is not BuildAbortedException; 2500string exception = ExceptionHandling.ReadAnyExceptionFromFile(_instantiationTimeUtc); 2501loggingService.LogError(buildEventContext, new BuildEventFileInfo(String.Empty) /* no project file */, "ChildExitedPrematurely", node, ExceptionHandling.DebugDumpPath, exception); 2507string exception = ExceptionHandling.ReadAnyExceptionFromFile(_instantiationTimeUtc); 2508loggingService.LogError(buildEventContext, new BuildEventFileInfo(String.Empty) /* no project file */, "ChildExitedPrematurely", node, ExceptionHandling.DebugDumpPath, exception); 2517loggingService.LogError(BuildEventContext.Invalid, new BuildEventFileInfo(String.Empty) /* no project file */, "ChildExitedPrematurely", node, ExceptionHandling.DebugDumpPath, shutdownPacket.Exception.ToString()); 3043catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (6)
241if (ExceptionHandling.IsCriticalException(e)) 260if (ExceptionHandling.IsCriticalException(e)) 296catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 896catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1387ExceptionHandling.DumpExceptionToFile(e); 1395if (ExceptionHandling.IsCriticalException(e))
BackEnd\Components\Communications\NodeEndpointInProc.cs (1)
457ExceptionHandling.DumpExceptionToFile(e);
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (2)
466catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 905catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
BackEnd\Components\Logging\EventSourceSink.cs (18)
351if (ExceptionHandling.IsCriticalException(exception)) 393if (ExceptionHandling.IsCriticalException(exception)) 435if (ExceptionHandling.IsCriticalException(exception)) 477if (ExceptionHandling.IsCriticalException(exception)) 519if (ExceptionHandling.IsCriticalException(exception)) 557if (ExceptionHandling.IsCriticalException(exception)) 599if (ExceptionHandling.IsCriticalException(exception)) 641if (ExceptionHandling.IsCriticalException(exception)) 683if (ExceptionHandling.IsCriticalException(exception)) 725if (ExceptionHandling.IsCriticalException(exception)) 767if (ExceptionHandling.IsCriticalException(exception)) 809if (ExceptionHandling.IsCriticalException(exception)) 851if (ExceptionHandling.IsCriticalException(exception)) 885if (ExceptionHandling.IsCriticalException(exception)) 923ExceptionHandling.DumpExceptionToFile(exception); 932ExceptionHandling.DumpExceptionToFile(exception); 934if (ExceptionHandling.IsCriticalException(exception)) 969if (ExceptionHandling.IsCriticalException(exception))
BackEnd\Components\Logging\LoggingService.cs (3)
1408catch (Exception e) when (!ExceptionHandling.IsCriticalException(e) && e is not LoggerException) 1462ExceptionHandling.DumpExceptionToFile(e); 1731catch (Exception e) when (!ExceptionHandling.IsCriticalException(e) && e is not LoggerException)
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
872if (ExceptionHandling.IsCriticalException(e))
BackEnd\Components\RequestBuilder\RequestBuilder.cs (3)
840if (ExceptionHandling.IsCriticalException(ex)) 845ExceptionHandling.DumpExceptionToFile(ex); 883catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (3)
986catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1011catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1046catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
BackEnd\Components\RequestBuilder\TaskBuilder.cs (3)
571catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 813if (ExceptionHandling.IsCriticalException(ex) || Environment.GetEnvironmentVariable("MSBUILDDONOTCATCHTASKEXCEPTIONS") == "1") 904if (ExceptionHandling.IsCriticalException(taskException) || (Environment.GetEnvironmentVariable("MSBUILDDONOTCATCHTASKEXCEPTIONS") == "1"))
BackEnd\Node\InProcNode.cs (2)
185ExceptionHandling.DumpExceptionToFile(e); 314catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
BackEnd\Node\OutOfProcNode.cs (1)
794catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (6)
374catch (Exception e) when (!ExceptionHandling.NotExpectedReflectionException(e)) 513catch (Exception e) when (!ExceptionHandling.NotExpectedReflectionException(e)) 656catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 986catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 1351catch (Exception e) when (e is not LoggerException && e is not InternalLoggerException && !ExceptionHandling.NotExpectedReflectionException(e)) 1565catch (Exception e) when (!ExceptionHandling.NotExpectedReflectionException(e))
Construction\ProjectRootElement.cs (2)
2054catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 2105catch (Exception ex) when (!ExceptionHandling.NotExpectedIoOrXmlException(ex))
Construction\Solution\SolutionFile.cs (2)
19using ExceptionUtilities = Microsoft.Build.Shared.ExceptionHandling; 483catch (Exception e) when (ExceptionUtilities.IsIoRelatedException(e))
Construction\Solution\SolutionProjectGenerator.cs (3)
1536catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1711catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2175catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) // We don't want any problems scanning the project file to result in aborting the build.
Definition\Project.cs (1)
474catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
Definition\Toolset.cs (5)
568catch (Exception e) when (!ExceptionHandling.NotExpectedRegistryException(e)) 716catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 970catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1012catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1057catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Definition\ToolsetReader.cs (1)
662catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Evaluation\Conditionals\FunctionCallExpressionNode.cs (1)
61catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Evaluation\Evaluator.cs (2)
2095catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 2140catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex))
Evaluation\Expander.cs (6)
1720catch (Exception ex) when (!ExceptionHandling.NotExpectedRegistryException(ex)) 2363catch (Exception e) when (!ExceptionHandling.NotExpectedException(e) || e is InvalidOperationException) 2416catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2500catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2573catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 3644catch (Exception ex) when (!ExceptionHandling.NotExpectedFunctionException(ex))
ExceptionHandling.cs (1)
341lock (typeof(ExceptionHandling))
FileMatcher.cs (4)
2011catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2595if (ex.Flatten().InnerExceptions.All(ExceptionHandling.IsIoRelatedException)) 2601catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 2619return ex.Flatten().InnerExceptions.All(ExceptionHandling.IsIoRelatedException);
FileUtilities.cs (5)
789catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 863catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 900catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 968catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1225catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex))
FrameworkLocationHelper.cs (1)
988catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Instance\TaskFactories\AssemblyTaskFactory.cs (2)
305catch (Exception e) when (!ExceptionHandling.NotExpectedReflectionException(e)) 456catch (Exception e) when (!ExceptionHandling.NotExpectedReflectionException(e))
Instance\TaskRegistry.cs (3)
1333catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 1453catch (Exception e) when (!ExceptionHandling.NotExpectedReflectionException(e)) 1532catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
Logging\FileLogger.cs (2)
122catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 151catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex))
Logging\LoggerDescription.cs (1)
166when (!(e is LoggerException /* Polite logger Failure*/ || e is InternalLoggerException /* LoggerClass not found*/ || ExceptionHandling.IsCriticalException(e)))
Modifiers.cs (1)
600catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
NodeEndpointOutOfProcBase.cs (5)
473catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 481ExceptionHandling.DumpExceptionToFile(e); 560ExceptionHandling.DumpExceptionToFile(e); 604ExceptionHandling.DumpExceptionToFile(e); 653ExceptionHandling.DumpExceptionToFile(e);
RegisteredTaskObjectCacheBase.cs (1)
151catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
TaskLoader.cs (1)
120taskAppDomain.UnhandledException += ExceptionHandling.UnhandledExceptionHandler;
TempFileUtilities.cs (1)
197catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex))
ToolsetElement.cs (1)
101catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex))
Utilities\RegistryKeyWrapper.cs (6)
87catch (Exception ex) when (!ExceptionHandling.NotExpectedRegistryException(ex)) 117catch (Exception ex) when (!ExceptionHandling.NotExpectedRegistryException(ex)) 133catch (Exception ex) when (!ExceptionHandling.NotExpectedRegistryException(ex)) 149catch (Exception ex) when (!ExceptionHandling.NotExpectedRegistryException(ex)) 176if (ExceptionHandling.NotExpectedRegistryException(ex)) 213catch (Exception ex) when (!ExceptionHandling.NotExpectedRegistryException(ex))
Microsoft.Build.Conversion.Core (1)
ProjectFileConverter.cs (1)
3367if (ExceptionHandling.NotExpectedException(e))
Microsoft.Build.Engine.UnitTests (14)
BackEnd\DebugUtils_tests.cs (3)
21var exceptionFilesBefore = Directory.GetFiles(ExceptionHandling.DebugDumpPath, "MSBuild_*failure.txt"); 27ExceptionHandling.DumpExceptionToFile(new Exception("hello world")); 28exceptionFiles = Directory.GetFiles(ExceptionHandling.DebugDumpPath, "MSBuild_*failure.txt");
BackEnd\EventSourceSink_Tests.cs (8)
174Assert.False(ExceptionHandling.IsCriticalException(e)); 184Assert.False(ExceptionHandling.IsCriticalException(e)); 195Assert.False(ExceptionHandling.IsCriticalException(e)); 209Assert.False(ExceptionHandling.IsCriticalException(e)); 219Assert.True(ExceptionHandling.IsCriticalException(e)); 230Assert.True(ExceptionHandling.IsCriticalException(e)); 244Assert.True(ExceptionHandling.IsCriticalException(e)); 273if (ExceptionHandling.IsCriticalException(e))
BackEnd\TaskExecutionHost_Tests.cs (3)
1090File.Exists(ExceptionHandling.DumpFilePath).ShouldBe(isCritical, 1091$"{ExceptionHandling.DumpFilePath} expected to exist: {isCritical}"); 1094FileUtilities.DeleteNoThrow(ExceptionHandling.DumpFilePath);