194 references to ExceptionHandling
Microsoft.Build (78)
BackEnd\BuildManager\BuildManager.cs (9)
41using ExceptionHandling = Microsoft.Build.Framework.ExceptionHandling; 1249ExceptionHandling.IsCriticalException(exception), 1590catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 1697catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 1708catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 2066catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex)) 2139return !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\Client\MSBuildClient.cs (1)
642catch (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)) 1465if (ExceptionHandling.IsCriticalException(e)) 1504catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (2)
848catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 1354catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (1)
665catch (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)
1513catch (Exception e) when (!ExceptionHandling.IsCriticalException(e) && e is not LoggerException) 1853catch (Exception e) when (!ExceptionHandling.IsCriticalException(e) && e is not LoggerException)
BackEnd\Components\ProjectCache\ProjectCacheService.cs (2)
27using ExceptionHandling = Microsoft.Build.Framework.ExceptionHandling; 1030if (ExceptionHandling.IsCriticalException(e))
BackEnd\Components\RequestBuilder\RequestBuilder.cs (2)
844if (ExceptionHandling.IsCriticalException(ex)) 891catch (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 (2)
850if (ExceptionHandling.IsCriticalException(ex) || Environment.GetEnvironmentVariable("MSBUILDDONOTCATCHTASKEXCEPTIONS") == "1") 941if (ExceptionHandling.IsCriticalException(taskException) || (Environment.GetEnvironmentVariable("MSBUILDDONOTCATCHTASKEXCEPTIONS") == "1"))
BackEnd\Components\Scheduler\Scheduler.cs (4)
2688catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 2857catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 2897catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 2924catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
BackEnd\Node\InProcNode.cs (1)
324catch (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)
2065catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 2116catch (Exception ex) when (!ExceptionHandling.NotExpectedIoOrXmlException(ex))
Construction\Solution\SolutionFile.cs (1)
748catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Construction\Solution\SolutionProjectGenerator.cs (1)
2249catch (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)
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)
623catch (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)
285catch (Exception e) when (!ExceptionHandling.NotExpectedReflectionException(e)) 506catch (Exception e) when (!ExceptionHandling.NotExpectedReflectionException(e))
Instance\TaskRegistry.cs (3)
1364catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 1494catch (Exception e) when (!ExceptionHandling.NotExpectedReflectionException(e)) 1588catch (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)
170when (!(e is LoggerException /* Polite logger Failure*/ || e is InternalLoggerException /* LoggerClass not found*/ || ExceptionHandling.IsCriticalException(e)))
src\msbuild\src\Shared\Debugging\DebugUtils.cs (2)
111isCritical: ExceptionHandling.IsCriticalException(ex)); 124lock (typeof(ExceptionHandling))
src\msbuild\src\Shared\NodeEndpointOutOfProcBase.cs (1)
507catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
src\msbuild\src\Shared\RegisteredTaskObjectCacheBase.cs (1)
150catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
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)
472catch (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 (72)
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)
704catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 926catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1018catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1232catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2944catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
AssemblyDependency\ResolveAssemblyReference.cs (2)
1673catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2893catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
AssemblyDependency\Resolver.cs (1)
334catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
Copy.cs (2)
993catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 1023catch (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)
61catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
FileIO\ReadLinesFromFile.cs (1)
71catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
FileIO\WriteLinesToFile.cs (5)
165catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 193catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 242catch (Exception ex) when (attempt < maxAttempts && ExceptionHandling.IsIoRelatedException(ex)) 249catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 291catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
FileState.cs (1)
216if (!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)) 2729catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2775catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 2797catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) 2888if (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)
179catch (Exception e) when (ExceptionHandling.IsIoRelatedException(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))
src\msbuild\src\Shared\NodePipeServer.cs (1)
151catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
StateFileBase.cs (3)
80catch (Exception e) when (!ExceptionHandling.NotExpectedSerializationException(e)) 151catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 181catch (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 (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)
915catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))
MSBuild (15)
OutOfProcTaskAppDomainWrapperBase.cs (5)
133catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 347catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 372catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 395catch (Exception e) when (!ExceptionHandling.IsCriticalException(e)) 425catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
OutOfProcTaskHostNode.cs (1)
1474catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
src\msbuild\src\Shared\Debugging\DebugUtils.cs (2)
111isCritical: ExceptionHandling.IsCriticalException(ex)); 124lock (typeof(ExceptionHandling))
src\msbuild\src\Shared\NodeEndpointOutOfProcBase.cs (1)
507catch (Exception e) when (!ExceptionHandling.IsCriticalException(e))
src\msbuild\src\Shared\RegisteredTaskObjectCacheBase.cs (1)
150catch (Exception ex) when (!ExceptionHandling.IsCriticalException(ex))
XMake.cs (5)
249isCritical: ExceptionHandling.IsCriticalException(ex)); 1118ExceptionHandling.IsCriticalException(exception), 2806catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 2825catch (Exception ex) when (ExceptionHandling.IsIoRelatedException(ex)) 3717catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e))