Skip to content

Commit e3c19eb

Browse files
committed
Bug 4149718 Fix
1 parent 2a5fcea commit e3c19eb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/ProtectionPolicy/RemoveAzureRMBackupProtectionPolicy.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,12 @@ public override void ExecuteCmdlet()
4040
if (policyInfo != null)
4141
{
4242
AzureBackupClient.DeleteProtectionPolicy(ProtectionPolicy.ResourceGroupName, ProtectionPolicy.ResourceName, policyInfo.Name);
43-
WriteVerbose("Successfully deleted policy");
43+
WriteDebug("Successfully deleted policy");
4444
}
4545
else
4646
{
47-
WriteVerbose("Policy Not Found");
47+
var exception = new ArgumentException(string.Format("ProtectionPolicy with name {0} does not exist.", policyInfo.Name));
48+
throw exception;
4849
}
4950
});
5051
}

0 commit comments

Comments
 (0)