226 references to ExceptionHandling
Microsoft.Build (94)
BackEnd\BuildManager\BuildManager.cs (9)
41using ExceptionHandling = Microsoft.Build.Framework.ExceptionHandling; 1248ExceptionHandling.IsCriticalException(exception), 1515catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 1622catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 1633catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 1991catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 2064return !ExceptionHandling.IsCriticalException(e) && !ExceptionHandling.NotExpectedException(e) && e is not BuildAbortedException; 3186catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
BackEnd\BuildManager\EnvironmentVariableValidator.cs (1)
48catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (5)
251if (ExceptionHandling.IsCriticalException(e)) 270if (ExceptionHandling.IsCriticalException(e)) 312catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 934catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1450if (ExceptionHandling.IsCriticalException(e))
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (2)
744catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 1250catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
BackEnd\Components\Logging\EventSourceSink.cs (3)
322if (ExceptionHandling.IsCriticalException(exception)) 414if (ExceptionHandling.IsCriticalException(exception)) 436if (ExceptionHandling.IsCriticalException(exception))
BackEnd\Components\Logging\LoggingService.cs (2)
1480catch (Exception e) when (!ExceptionHandling.IsCriticalException(e) && e is not LoggerException) 1822catch (Exception e) when (!ExceptionHandling.IsCriticalException(e) && e is not LoggerException)
BackEnd\Components\ProjectCache\ProjectCacheService.cs (2)
27using ExceptionHandling = Microsoft.Build.Framework.ExceptionHandling; 1007if (ExceptionHandling.IsCriticalException(e))
BackEnd\Components\RequestBuilder\RequestBuilder.cs (2)
843if (ExceptionHandling.IsCriticalException(ex)) 888catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (3)
990catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1015catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1050catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
BackEnd\Components\RequestBuilder\TaskBuilder.cs (3)
599catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 838if (ExceptionHandling.IsCriticalException(ex) || Environment.GetEnvironmentVariable("MSBUILDDONOTCATCHTASKEXCEPTIONS") == "1") 929if (ExceptionHandling.IsCriticalException(taskException) || (Environment.GetEnvironmentVariable("MSBUILDDONOTCATCHTASKEXCEPTIONS") == "1"))
BackEnd\Components\Scheduler\Scheduler.cs (4)
2684catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 2815catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 2855catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 2882catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
BackEnd\Node\InProcNode.cs (1)
330catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
BackEnd\Node\OutOfProcNode.cs (1)
820catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (6)
435catch (Exception e) when (!ExceptionHandling.NotExpectedReflectionException(e)) 574catch (Exception e) when (!ExceptionHandling.NotExpectedReflectionException(e)) 718catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 1084catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 1457catch (Exception e) when (e is not LoggerException && e is not InternalLoggerException && !ExceptionHandling.NotExpectedReflectionException(e)) 1743catch (Exception e) when (!ExceptionHandling.NotExpectedReflectionException(e))
Construction\ProjectRootElement.cs (2)
2071catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 2122catch (Exception ex) when (!ExceptionHandling.NotExpectedIoOrXmlException(ex))
Construction\Solution\SolutionFile.cs (1)
748catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Construction\Solution\SolutionProjectGenerator.cs (3)
1553catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1728catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2192catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) // We don't want any problems scanning the project file to result in aborting the build.
DebugUtils.cs (2)
244isCritical: ExceptionHandling.IsCriticalException(ex)); 258lock (typeof(ExceptionHandling))
Definition\Project.cs (1)
480catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
Definition\Toolset.cs (4)
607catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 864catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 911catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 957catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Definition\ToolsetReader.cs (1)
626catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Evaluation\Conditionals\FunctionCallExpressionNode.cs (1)
61catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Evaluation\Evaluator.cs (2)
2081catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 2126catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex))
Evaluation\Expander.cs (6)
1812catch (Exception ex) when (!ExceptionHandling.NotExpectedRegistryException(ex)) 2562catch (Exception e) when (!ExceptionHandling.NotExpectedException(e) || e is InvalidOperationException) 2617catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2703catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2778catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 4168catch (Exception ex) when (!ExceptionHandling.NotExpectedFunctionException(ex))
FileMatcher.cs (4)
2026catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2611if (ex.Flatten().InnerExceptions.All(ExceptionHandling.IsIoRelatedException)) 2622catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 2644return ex.Flatten().InnerExceptions.All(ExceptionHandling.IsIoRelatedException);
FrameworkLocationHelper.cs (1)
1026catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Instance\TaskFactories\AssemblyTaskFactory.cs (2)
304catch (Exception e) when (!ExceptionHandling.NotExpectedReflectionException(e)) 510catch (Exception e) when (!ExceptionHandling.NotExpectedReflectionException(e))
Instance\TaskRegistry.cs (3)
1366catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 1496catch (Exception e) when (!ExceptionHandling.NotExpectedReflectionException(e)) 1590catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
LoadedType.cs (4)
117catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 134catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 145catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 157catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
Logging\BinaryLogger\ProjectImportsCollector.cs (1)
149catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Logging\FileLogger.cs (2)
121catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 150catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex))
Logging\LoggerDescription.cs (1)
170when (!(e is LoggerException /* Polite logger Failure*/ || e is InternalLoggerException /* LoggerClass not found*/ || ExceptionHandling.IsCriticalException(e)))
NodeEndpointOutOfProcBase.cs (1)
510catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
RegisteredTaskObjectCacheBase.cs (1)
150catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
ToolsetElement.cs (1)
102catch (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.Engine.OM.UnitTests (1)
DebugUtils.cs (1)
258lock (typeof(ExceptionHandling))
Microsoft.Build.Engine.UnitTests (8)
BackEnd\EventSourceSink_Tests.cs (8)
177Assert.False(ExceptionHandling.IsCriticalException(e)); 187Assert.False(ExceptionHandling.IsCriticalException(e)); 198Assert.False(ExceptionHandling.IsCriticalException(e)); 212Assert.False(ExceptionHandling.IsCriticalException(e)); 222Assert.True(ExceptionHandling.IsCriticalException(e)); 233Assert.True(ExceptionHandling.IsCriticalException(e)); 247Assert.True(ExceptionHandling.IsCriticalException(e)); 276if (ExceptionHandling.IsCriticalException(e))
Microsoft.Build.Framework (8)
FileUtilities.cs (6)
890catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 973catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 1053catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 1090catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 1158catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1415catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex))
FileUtilities_TempFiles.cs (1)
195catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex))
ItemSpecModifiers.cs (1)
380catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Microsoft.Build.Tasks.Core (76)
AppConfig\AppConfig.cs (1)
54catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
AppConfig\BindingRedirect.cs (2)
64catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 78catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
AssemblyDependency\ReferenceTable.cs (5)
694catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 916catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1008catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1222catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2927catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
AssemblyDependency\ResolveAssemblyReference.cs (2)
1545catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2748catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
AssemblyDependency\Resolver.cs (1)
328catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Copy.cs (2)
984catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1014catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
CreateManifestResourceName.cs (1)
255catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
DebugUtils.cs (2)
244isCritical: ExceptionHandling.IsCriticalException(ex)); 258lock (typeof(ExceptionHandling))
Delete.cs (1)
154catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
ErrorFromResources.cs (1)
61catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
FileIO\ReadLinesFromFile.cs (1)
71catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
FileIO\WriteLinesToFile.cs (5)
147catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 175catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 251catch (Exception fallbackEx) when (ExceptionHandling.IsIoRelatedException(fallbackEx)) 259catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 299catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
FileMatcher.cs (4)
2026catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2611if (ex.Flatten().InnerExceptions.All(ExceptionHandling.IsIoRelatedException)) 2622catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 2644return ex.Flatten().InnerExceptions.All(ExceptionHandling.IsIoRelatedException);
FileState.cs (1)
207if (!ExceptionHandling.IsIoRelatedException(_exceptionThrown))
GenerateResource.cs (7)
1544catch (Exception e) when (!ExceptionHandling.NotExpectedIoOrXmlException(e) || e is MSBuildResXException) 1638catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2644catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2733catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2779catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 2801catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2892if (ExceptionHandling.NotExpectedException(deleteException))
GetAssemblyIdentity.cs (1)
78catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
GetInstalledSDKLocations.cs (1)
150catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
GetReferenceAssemblyPaths.cs (1)
224if (ExceptionHandling.IsCriticalException(e))
GetSDKReferenceFiles.cs (6)
290catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 940catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 970catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 983catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 1105catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 1139catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
ListOperators\FindUnderPath.cs (2)
81catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 110catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
MakeDir.cs (1)
86catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
ManifestUtil\LauncherBuilder.cs (1)
95catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex))
Move.cs (1)
179catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
NodePipeServer.cs (1)
151catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
RedistList.cs (1)
745catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex))
RemoveDir.cs (2)
140catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 178catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
StateFileBase.cs (3)
63catch (Exception e) when (!ExceptionHandling.NotExpectedSerializationException(e)) 117catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 146catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Touch.cs (4)
191catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 263catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 279catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 295catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
WriteCodeFragment.cs (3)
133catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 569catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 597catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
XmlPeek.cs (4)
77catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 92catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 109catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 122catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
XmlPoke.cs (4)
81catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 95catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 109catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 136catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
XslTransformation.cs (4)
120catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 147catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 165catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 192catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
Microsoft.Build.Utilities.Core (18)
DebugUtils.cs (2)
244isCritical: ExceptionHandling.IsCriticalException(ex)); 258lock (typeof(ExceptionHandling))
FileMatcher.cs (4)
2026catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2611if (ex.Flatten().InnerExceptions.All(ExceptionHandling.IsIoRelatedException)) 2622catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 2644return ex.Flatten().InnerExceptions.All(ExceptionHandling.IsIoRelatedException);
FrameworkLocationHelper.cs (1)
1026catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
PlatformManifest.cs (1)
157catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
SDKManifest.cs (1)
359catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
ToolLocationHelper.cs (7)
866catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1063catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1183catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1472catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 3079catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 3174catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 3222catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
ToolsetElement.cs (1)
102catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex))
ToolTask.cs (1)
873catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
MSBuild (21)
DebugUtils.cs (2)
244isCritical: ExceptionHandling.IsCriticalException(ex)); 258lock (typeof(ExceptionHandling))
FrameworkLocationHelper.cs (1)
1026catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
LoadedType.cs (4)
117catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 134catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 145catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 157catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
NodeEndpointOutOfProcBase.cs (1)
510catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
OutOfProcTaskAppDomainWrapperBase.cs (6)
132catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 258catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 346catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 371catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 393catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 419catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
OutOfProcTaskHostNode.cs (1)
1107catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
RegisteredTaskObjectCacheBase.cs (1)
150catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
XMake.cs (5)
249isCritical: ExceptionHandling.IsCriticalException(ex)); 1113ExceptionHandling.IsCriticalException(exception), 2793catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 2812catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 3704catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))