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