218 references to ExceptionHandling
Microsoft.Build (92)
BackEnd\BuildManager\BuildManager.cs (11)
43using ExceptionHandling = Microsoft.Build.Framework.ExceptionHandling; 801catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 822catch (Exception cleanupFailure) when (!ExceptionHandling.IsCriticalException(cleanupFailure)) 1323catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 1482ExceptionHandling.IsCriticalException(exception), 1836catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 1966if (ExceptionHandling.IsCriticalException(ex)) 2330catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 2403return !ExceptionHandling.IsCriticalException(e) && !ExceptionHandling.NotExpectedException(e) && e is not BuildAbortedException; 3536catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
BackEnd\BuildManager\EnvironmentVariableValidator.cs (1)
48catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
BackEnd\BuildManager\MultiThreadedStrictModeScope.cs (5)
96catch (Exception entryFailure) when (!ExceptionHandling.IsCriticalException(entryFailure)) 102catch (Exception restorationFailure) when (!ExceptionHandling.IsCriticalException(restorationFailure)) 164catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 232catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 290catch (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) 794catch (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)
308catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 394catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 912catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 1590catch (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)
1580catch (Exception e) when (!ExceptionHandling.IsCriticalException(e) && e is not LoggerException) 1920catch (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)
852if (ExceptionHandling.IsCriticalException(ex)) 904catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (3)
987catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1012catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1047catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
BackEnd\Components\RequestBuilder\TaskBuilder.cs (3)
492catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 876if (ExceptionHandling.IsCriticalException(ex) || Environment.GetEnvironmentVariable("MSBUILDDONOTCATCHTASKEXCEPTIONS") == "1") 967if (ExceptionHandling.IsCriticalException(taskException) || (Environment.GetEnvironmentVariable("MSBUILDDONOTCATCHTASKEXCEPTIONS") == "1"))
BackEnd\Components\Scheduler\Scheduler.cs (4)
2716catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 2885catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 2925catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 2952catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
BackEnd\Node\InProcNode.cs (1)
324catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
BackEnd\Node\OutOfProcNode.cs (1)
839catch (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)
589catch (Exception e) when (!ExceptionHandling.NotExpectedReflectionException(e)) 731catch (Exception e) when (!ExceptionHandling.NotExpectedReflectionException(e)) 878catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 1361catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 1881catch (Exception e) when (e is not LoggerException && e is not InternalLoggerException && !ExceptionHandling.NotExpectedReflectionException(e)) 2175catch (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)
2255catch (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)
468catch (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)
638catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Evaluation\Conditionals\FunctionCallExpressionNode.cs (1)
61catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Evaluation\Evaluator.cs (2)
2226catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 2271catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex))
Evaluation\Expander.Function.cs (1)
602catch (Exception ex) when (!ExceptionHandling.NotExpectedFunctionException(ex))
Evaluation\Expander.ItemExpander.Transforms.cs (4)
129catch (Exception e) when (!ExceptionHandling.NotExpectedException(e) || e is InvalidOperationException) 189catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 285catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 366catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Evaluation\Expander.PropertyExpander.cs (1)
749catch (Exception ex) when (!ExceptionHandling.NotExpectedRegistryException(ex))
Evaluation\ToolsetElement.cs (1)
102catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex))
Instance\TaskFactories\AssemblyTaskFactory.cs (2)
295catch (Exception e) when (!ExceptionHandling.NotExpectedReflectionException(e)) 502catch (Exception e) when (!ExceptionHandling.NotExpectedReflectionException(e))
Instance\TaskRegistry.cs (3)
1354catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 1486catch (Exception e) when (!ExceptionHandling.NotExpectedReflectionException(e)) 1580catch (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 (18)
FileUtilities_TempFiles.cs (1)
204catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex))
FileUtilities.cs (7)
919catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 1002catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 1082catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 1105catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1143catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 1211catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1468catch (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 (1)
108catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
Utilities\FileMatcher.cs (2)
4006ExceptionHandling.IsIoRelatedException(exception) 4008&& aggregateException.Flatten().InnerExceptions.All(ExceptionHandling.IsIoRelatedException));
Utilities\FrameworkLocationHelper.cs (1)
1046catch (Exception e) when (ExceptionHandling.IsIoRelatedException(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)) 3268catch (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)
1621catch (Exception e) when (!ExceptionHandling.NotExpectedIoOrXmlException(e) || e is MSBuildResXException) 1715catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2721catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2806catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2852catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 2874catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2965if (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)
87catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 109catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 123catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 150catch (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 (12)
PlatformManifest.cs (1)
157catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
SDKManifest.cs (1)
358catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
src\msbuild\src\Shared\Debugging\DebugUtils.cs (2)
111isCritical: ExceptionHandling.IsCriticalException(ex)); 124lock (typeof(ExceptionHandling))
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)
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)) 364catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 404catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 427catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 463catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
OutOfProcTaskHostNode.cs (2)
1482catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 1758catch (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)); 1398ExceptionHandling.IsCriticalException(exception), 3276catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 3295catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 4244catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))