214 references to ExceptionHandling
Microsoft.Build (77)
BackEnd\BuildManager\BuildManager.cs (9)
41using ExceptionHandling = Microsoft.Build.Framework.ExceptionHandling; 1249ExceptionHandling.IsCriticalException(exception), 1592catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 1699catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 1710catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 2068catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 2141return !ExceptionHandling.IsCriticalException(e) && !ExceptionHandling.NotExpectedException(e) && e is not BuildAbortedException; 3263catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
BackEnd\BuildManager\EnvironmentVariableValidator.cs (1)
48catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (6)
257if (ExceptionHandling.IsCriticalException(e)) 276if (ExceptionHandling.IsCriticalException(e)) 318catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 940catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1456if (ExceptionHandling.IsCriticalException(e)) 1581catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (2)
780catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 1286catch (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)
1517catch (Exception e) when (!ExceptionHandling.IsCriticalException(e) && e is not LoggerException) 1859catch (Exception e) when (!ExceptionHandling.IsCriticalException(e) && e is not LoggerException)
BackEnd\Components\ProjectCache\ProjectCacheService.cs (2)
27using ExceptionHandling = Microsoft.Build.Framework.ExceptionHandling; 1031if (ExceptionHandling.IsCriticalException(e))
BackEnd\Components\RequestBuilder\RequestBuilder.cs (2)
844if (ExceptionHandling.IsCriticalException(ex)) 889catch (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 (2)
838if (ExceptionHandling.IsCriticalException(ex) || Environment.GetEnvironmentVariable("MSBUILDDONOTCATCHTASKEXCEPTIONS") == "1") 929if (ExceptionHandling.IsCriticalException(taskException) || (Environment.GetEnvironmentVariable("MSBUILDDONOTCATCHTASKEXCEPTIONS") == "1"))
BackEnd\Components\Scheduler\Scheduler.cs (4)
2683catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 2814catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 2854catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 2881catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
BackEnd\Node\InProcNode.cs (1)
329catch (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 (1)
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)
111isCritical: ExceptionHandling.IsCriticalException(ex)); 124lock (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)
1817catch (Exception ex) when (!ExceptionHandling.NotExpectedRegistryException(ex)) 2567catch (Exception e) when (!ExceptionHandling.NotExpectedException(e) || e is InvalidOperationException) 2622catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2708catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2783catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 4225catch (Exception ex) when (!ExceptionHandling.NotExpectedFunctionException(ex))
Evaluation\ToolsetElement.cs (1)
102catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex))
Instance\TaskFactories\AssemblyTaskFactory.cs (2)
297catch (Exception e) when (!ExceptionHandling.NotExpectedReflectionException(e)) 499catch (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))
Logging\BinaryLogger\ProjectImportsCollector.cs (1)
146catch (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))
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 (17)
FileUtilities.cs (6)
944catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 1027catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 1107catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 1144catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 1212catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1469catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex))
FileUtilities_TempFiles.cs (1)
204catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex))
ItemSpecModifiers.cs (1)
491catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Loader\LoadedType.cs (4)
116catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 133catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 144catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 156catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
Utilities\FileMatcher.cs (4)
2029catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2614if (ex.Flatten().InnerExceptions.All(ExceptionHandling.IsIoRelatedException)) 2625catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 2647return ex.Flatten().InnerExceptions.All(ExceptionHandling.IsIoRelatedException);
Utilities\FrameworkLocationHelper.cs (1)
1046catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Microsoft.Build.Tasks.Core (84)
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\AssemblyInformation.cs (1)
422catch (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))
CodeTaskFactory.cs (1)
663catch (Exception e) when (!ExceptionHandling.IsCriticalException(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)
111isCritical: ExceptionHandling.IsCriticalException(ex)); 124lock (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))
FileState.cs (1)
207if (!ExceptionHandling.IsIoRelatedException(_exceptionThrown))
GenerateResource.cs (9)
1544catch (Exception e) when (!ExceptionHandling.NotExpectedIoOrXmlException(e) || e is MSBuildResXException) 1638catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1925catch (Exception e) when (!ExceptionHandling.IsCriticalException(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)) 3138catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
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))
ResolveComReference.cs (3)
1287catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1372catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1416catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
ResolveKeySource.cs (1)
153catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
SGen.cs (2)
175catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 424catch (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))
TlbReference.cs (1)
350catch (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))
XamlTaskFactory\TaskParser.cs (1)
134catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
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 (12)
DebugUtils.cs (2)
111isCritical: ExceptionHandling.IsCriticalException(ex)); 124lock (typeof(ExceptionHandling))
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))
ToolTask.cs (1)
882catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
MSBuild (16)
DebugUtils.cs (2)
111isCritical: ExceptionHandling.IsCriticalException(ex)); 124lock (typeof(ExceptionHandling))
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)
1114catch (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))