File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
ResourceManager/Implementation/CmdletBase Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -423,7 +423,8 @@ private void HandleException(ExceptionDispatchInfo capturedException)
423
423
var errorResponseException = capturedException . SourceException as ErrorResponseMessageException ;
424
424
if ( errorResponseException != null )
425
425
{
426
- this . ThrowTerminatingError ( errorResponseException . ToErrorRecord ( ) ) ;
426
+ this . WriteError ( errorResponseException . ToErrorRecord ( ) ) ;
427
+ return ;
427
428
}
428
429
429
430
var aggregateException = capturedException . SourceException as AggregateException ;
@@ -435,18 +436,22 @@ private void HandleException(ExceptionDispatchInfo capturedException)
435
436
errorResponseException = aggregateException . InnerExceptions . Single ( ) as ErrorResponseMessageException ;
436
437
if ( errorResponseException != null )
437
438
{
438
- this . ThrowTerminatingError ( errorResponseException . ToErrorRecord ( ) ) ;
439
+ this . WriteError ( errorResponseException . ToErrorRecord ( ) ) ;
440
+ return ;
439
441
}
440
442
441
- this . ThrowTerminatingError ( aggregateException . InnerExceptions . Single ( ) . ToErrorRecord ( ) ) ;
443
+ this . WriteError ( aggregateException . InnerExceptions . Single ( ) . ToErrorRecord ( ) ) ;
444
+ return ;
442
445
}
443
446
else
444
447
{
445
- this . ThrowTerminatingError ( aggregateException . ToErrorRecord ( ) ) ;
448
+ this . WriteError ( aggregateException . ToErrorRecord ( ) ) ;
449
+ return ;
446
450
}
447
451
}
448
452
449
- capturedException . Throw ( ) ;
453
+ this . WriteError ( capturedException . SourceException . ToErrorRecord ( ) ) ;
454
+ return ;
450
455
}
451
456
finally
452
457
{
Original file line number Diff line number Diff line change 18
18
- Additional information about change #1
19
19
-->
20
20
## Upcoming Release
21
+ * Fix for issue https://github.com/Azure/azure-powershell/issues/8235
21
22
* Fix incorrect examples in ` New-AzADAppCredential ` and ` New-AzADSpCredential ` reference documentation
22
23
* Fix issue where path for ` -TemplateFile ` parameter was not being resolved before executing resource group deployment cmdlets
23
24
* Az.Resources: Correct documentation for New-AzureRmPolicyDefinition -Mode default value
You can’t perform that action at this time.
0 commit comments