220 references to ExceptionHandling
Microsoft.Build (92)
BackEnd\BuildManager\BuildManager.cs (11)
43using ExceptionHandling = Microsoft.Build.Framework.ExceptionHandling; 807catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 828catch (Exception cleanupFailure) when (!ExceptionHandling.IsCriticalException(cleanupFailure)) 1344catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 1511ExceptionHandling.IsCriticalException(exception), 1864catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 1994if (ExceptionHandling.IsCriticalException(ex)) 2358catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 2434return !ExceptionHandling.IsCriticalException(e) && !ExceptionHandling.NotExpectedException(e) && e is not BuildAbortedException; 3583catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
BackEnd\BuildManager\EnvironmentVariableValidator.cs (1)
49catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
BackEnd\BuildManager\MultiThreadedStrictModeScope.cs (5)
97catch (Exception entryFailure) when (!ExceptionHandling.IsCriticalException(entryFailure)) 103catch (Exception restorationFailure) when (!ExceptionHandling.IsCriticalException(restorationFailure)) 165catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 233catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 291catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
BackEnd\Client\MSBuildClient.cs (3)
264catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex) && ex is not PathTooLongException) 540catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex) && ex is not PathTooLongException) 795catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (5)
277if (ExceptionHandling.IsCriticalException(e)) 296if (ExceptionHandling.IsCriticalException(e)) 337catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 1472if (ExceptionHandling.IsCriticalException(e)) 1511catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (4)
312catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 398catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 916catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 1605catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (1)
1010catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
BackEnd\Components\Logging\EventSourceSink.cs (3)
321if (ExceptionHandling.IsCriticalException(exception)) 413if (ExceptionHandling.IsCriticalException(exception)) 435if (ExceptionHandling.IsCriticalException(exception))
BackEnd\Components\Logging\LoggingService.cs (2)
1724catch (Exception e) when (!ExceptionHandling.IsCriticalException(e) && e is not LoggerException) 2064catch (Exception e) when (!ExceptionHandling.IsCriticalException(e) && e is not LoggerException)
BackEnd\Components\ProjectCache\ProjectCacheService.cs (2)
28using ExceptionHandling = Microsoft.Build.Framework.ExceptionHandling; 1035if (ExceptionHandling.IsCriticalException(e))
BackEnd\Components\RequestBuilder\RequestBuilder.cs (2)
855if (ExceptionHandling.IsCriticalException(ex)) 907catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (3)
996catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1021catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1056catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
BackEnd\Components\RequestBuilder\TaskBuilder.cs (3)
495catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 899if (ExceptionHandling.IsCriticalException(ex) || Environment.GetEnvironmentVariable("MSBUILDDONOTCATCHTASKEXCEPTIONS") == "1") 990if (ExceptionHandling.IsCriticalException(taskException) || (Environment.GetEnvironmentVariable("MSBUILDDONOTCATCHTASKEXCEPTIONS") == "1"))
BackEnd\Components\Scheduler\Scheduler.cs (4)
2720catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 2889catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 2929catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 2956catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
BackEnd\Node\InProcNode.cs (1)
324catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
BackEnd\Node\OutOfProcNode.cs (1)
842catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
BackEnd\Node\ServerNamedMutex.cs (1)
47catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex) && ex is not PathTooLongException)
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (6)
590catch (Exception e) when (!ExceptionHandling.NotExpectedReflectionException(e)) 732catch (Exception e) when (!ExceptionHandling.NotExpectedReflectionException(e)) 879catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 1365catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 1885catch (Exception e) when (e is not LoggerException && e is not InternalLoggerException && !ExceptionHandling.NotExpectedReflectionException(e)) 2179catch (Exception e) when (!ExceptionHandling.NotExpectedReflectionException(e))
Construction\ProjectRootElement.cs (2)
2067catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 2118catch (Exception ex) when (!ExceptionHandling.NotExpectedIoOrXmlException(ex))
Construction\Solution\SolutionFile.cs (1)
748catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Construction\Solution\SolutionProjectGenerator.cs (1)
2257catch (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)
469catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
Definition\Toolset.cs (4)
606catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 863catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 914catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 960catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Definition\ToolsetReader.cs (1)
639catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Evaluation\Conditionals\FunctionCallExpressionNode.cs (1)
61catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Evaluation\Evaluator.cs (2)
2230catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 2275catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex))
Evaluation\Expander.Function.cs (1)
606catch (Exception ex) when (!ExceptionHandling.NotExpectedFunctionException(ex))
Evaluation\Expander.ItemExpander.Transforms.cs (4)
131catch (Exception e) when (!ExceptionHandling.NotExpectedException(e) || e is InvalidOperationException) 191catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 287catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 368catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Evaluation\Expander.PropertyExpander.cs (1)
753catch (Exception ex) when (!ExceptionHandling.NotExpectedRegistryException(ex))
Evaluation\ToolsetElement.cs (1)
102catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex))
Instance\TaskFactories\AssemblyTaskFactory.cs (2)
300catch (Exception e) when (!ExceptionHandling.NotExpectedReflectionException(e)) 515catch (Exception e) when (!ExceptionHandling.NotExpectedReflectionException(e))
Instance\TaskRegistry.cs (3)
1155catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 1292catch (Exception e) when (!ExceptionHandling.NotExpectedReflectionException(e)) 1386catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
Logging\BinaryLogger\ProjectImportsCollector.cs (1)
146catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Logging\FileLogger.cs (2)
120catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 149catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex))
Logging\LoggerDescription.cs (1)
172when (!(e is LoggerException /* Polite logger Failure*/ || e is InternalLoggerException /* LoggerClass not found*/ || ExceptionHandling.IsCriticalException(e)))
parent\Shared\NodeEndpointOutOfProcBase.cs (1)
530catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
parent\Shared\RegisteredTaskObjectCacheBase.cs (1)
150catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
parent\Shared\TypeLoader.cs (1)
328catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
src\msbuild\src\Shared\Debugging\DebugUtils.cs (2)
111isCritical: ExceptionHandling.IsCriticalException(ex)); 124lock (typeof(ExceptionHandling))
Microsoft.Build.Framework (29)
FileUtilities_TempFiles.cs (1)
204catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex))
FileUtilities.cs (7)
920catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 1003catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 1083catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 1106catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1144catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 1212catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1469catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex))
ItemSpecModifiers.cs (1)
490catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Loader\LoadedType.cs (4)
196catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 210catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 229catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 257catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
ReflectableTaskPropertyInfo.cs (1)
97catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
Telemetry\TelemetryManager.cs (3)
140catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 196catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 244catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
Utilities\FileMatcher.cs (2)
4006ExceptionHandling.IsIoRelatedException(exception) 4008&& aggregateException.Flatten().InnerExceptions.All(ExceptionHandling.IsIoRelatedException));
Utilities\FrameworkLocationHelper.cs (1)
1026catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Utilities\PlatformManifest.cs (1)
158catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
Utilities\SDKManifest.cs (1)
337catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
Utilities\ToolLocationHelper_PlatformSDKs.cs (3)
129catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 214catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 335catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Utilities\ToolLocationHelper_ReferenceAssemblies.cs (2)
667catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 715catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
Utilities\ToolLocationHelper_SDKDiscovery.cs (1)
695catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Utilities\ToolLocationHelper_VisualStudio.cs (1)
89catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
Microsoft.Build.Tasks.Core (74)
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\AssemblyFoldersFromConfig\AssemblyFoldersFromConfigResolver.cs (1)
141catch (Exception e) when (e is XmlException || ExceptionHandling.IsIoRelatedException(e))
AssemblyDependency\ReferenceTable.cs (5)
714catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 936catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1029catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1263catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 3002catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
AssemblyDependency\ResolveAssemblyReference.cs (2)
1700catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 3282catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)
AssemblyDependency\Resolver.cs (1)
339catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Copy.cs (2)
991catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1021catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
CreateManifestResourceName.cs (1)
259catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Delete.cs (1)
153catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
ErrorFromResources.cs (1)
75catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
FileIO\ReadLinesFromFile.cs (1)
71catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
FileIO\WriteLinesToFile.cs (4)
157catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 206catch (Exception ex) when (attempt < maxAttempts && ExceptionHandling.IsIoRelatedException(ex)) 213catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 255catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
FileState.cs (1)
216if (!ExceptionHandling.IsIoRelatedException(_exceptionThrown))
GenerateResource.cs (7)
1623catch (Exception e) when (!ExceptionHandling.NotExpectedIoOrXmlException(e) || e is MSBuildResXException) 1717catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2725catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2810catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2856catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 2878catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2969if (ExceptionHandling.NotExpectedException(deleteException))
GetAssemblyIdentity.cs (1)
85catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
GetInstalledSDKLocations.cs (1)
160catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
GetReferenceAssemblyPaths.cs (1)
240if (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)
83catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 114catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
MakeDir.cs (1)
85catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
ManifestUtil\LauncherBuilder.cs (1)
112catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex))
Move.cs (1)
174catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
parent\Shared\NodePipeServer.cs (1)
151catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
RedistList.cs (1)
745catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex))
RemoveDir.cs (2)
139catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 177catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
src\msbuild\src\Shared\Debugging\DebugUtils.cs (2)
111isCritical: ExceptionHandling.IsCriticalException(ex)); 124lock (typeof(ExceptionHandling))
StateFileBase.cs (3)
81catch (Exception e) when (!ExceptionHandling.NotExpectedSerializationException(e)) 152catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 182catch (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)
135catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 576catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 604catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
XmlPeek.cs (4)
77catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 92catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 117catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 130catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
XmlPoke.cs (4)
88catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 110catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 124catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 151catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
XmlTaskUtility.cs (1)
54catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
XslTransformation.cs (5)
139catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 166catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 184catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 220catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 241catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
Microsoft.Build.Utilities.Core (3)
src\msbuild\src\Shared\Debugging\DebugUtils.cs (2)
111isCritical: ExceptionHandling.IsCriticalException(ex)); 124lock (typeof(ExceptionHandling))
ToolTask.cs (1)
911catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
MSBuild (22)
FilteredBinlogReplay.cs (5)
90catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 225catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 240catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 268catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 283catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex))
OutOfProcTaskAppDomainWrapperBase.cs (5)
134catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 379catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 419catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 442catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 478catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
OutOfProcTaskHostNode.cs (2)
1481catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 1757catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
parent\Shared\NodeEndpointOutOfProcBase.cs (1)
530catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
parent\Shared\RegisteredTaskObjectCacheBase.cs (1)
150catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
parent\Shared\TypeLoader.cs (1)
328catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
src\msbuild\src\Shared\Debugging\DebugUtils.cs (2)
111isCritical: ExceptionHandling.IsCriticalException(ex)); 124lock (typeof(ExceptionHandling))
XMake.cs (5)
250isCritical: ExceptionHandling.IsCriticalException(ex)); 1444ExceptionHandling.IsCriticalException(exception), 3301catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 3320catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 4269catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))