Skip to content

Commit ad81bb1

Browse files
committed
Merge pull request #251 from MabOneSdk/pikumar-dev1
Adding Exceptions to Resx file
2 parents 5b4595b + 59d6160 commit ad81bb1

File tree

4 files changed

+29
-3
lines changed

4 files changed

+29
-3
lines changed

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Models/Properties/Resources.Designer.cs

Lines changed: 19 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Models/Properties/Resources.resx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,4 +410,10 @@ Please contact Microsoft for further assistant.</value>
410410
<data name="RestoreOperation" xml:space="preserve">
411411
<value>Restore Azure Backup Item Operation</value>
412412
</data>
413+
<data name="UnsupportedAzureRmBackupManagementServerException" xml:space="preserve">
414+
<value>Please provide AzureRmBackupManagementServer of BackupEngineType as DpmEngine or DpmVenusEngine and provide BackupManagementType as SCDPM. Provided AzureRmBackupManagementServer has BackupEngineType {0} and backupManagementType {1} which is not valid.</value>
415+
</data>
416+
<data name="UnsupportedContainerException" xml:space="preserve">
417+
<value>Please provide Container of containerType as Windows and backupManagementType as MARS. Provided Container has containerType {0} and backupManagementType {1} which is invalid.</value>
418+
</data>
413419
</root>

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup/Cmdlets/Container/UnregisterAzureRmBackupManagementServer.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
using Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models;
1616
using Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.ProviderModel;
1717
using Microsoft.Azure.Commands.RecoveryServices.Backup.Helpers;
18+
using Microsoft.Azure.Commands.RecoveryServices.Backup.Properties;
1819
using System;
1920
using System.Collections.Generic;
2021
using System.Linq;
@@ -40,7 +41,7 @@ public override void ExecuteCmdlet()
4041
if ((AzureRmBackupManagementServer.BackupEngineType != BackupEngineType.DpmEngine && AzureRmBackupManagementServer.BackupEngineType != BackupEngineType.DpmVenusEngine)||
4142
AzureRmBackupManagementServer.BackupManagementType != BackupManagementType.SCDPM)
4243
{
43-
throw new ArgumentException(String.Format("Please provide AzureRmBackupManagementServer of BackupEngineType as DpmEngine or DpmVenusEngine and provide BackupManagementType as SCDPM. Provided AzureRmBackupManagementServer has BackupEngineType {0} and backupManagementType {1} which is not valid.", AzureRmBackupManagementServer.BackupEngineType, AzureRmBackupManagementServer.BackupManagementType));
44+
throw new ArgumentException(String.Format(Resources.UnsupportedAzureRmBackupManagementServerException, AzureRmBackupManagementServer.BackupEngineType, AzureRmBackupManagementServer.BackupManagementType));
4445
}
4546

4647
string azureRmBackupManagementServer = AzureRmBackupManagementServer.Name;

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup/Cmdlets/Container/UnregisterAzureRmRecoveryServicesBackupContainer.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
using Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models;
1616
using Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.ProviderModel;
1717
using Microsoft.Azure.Commands.RecoveryServices.Backup.Helpers;
18+
using Microsoft.Azure.Commands.RecoveryServices.Backup.Properties;
1819
using System;
1920
using System.Collections.Generic;
2021
using System.Linq;
@@ -42,7 +43,7 @@ public override void ExecuteCmdlet()
4243

4344
if (Container.ContainerType != ContainerType.Windows || Container.BackupManagementType != BackupManagementType.MARS)
4445
{
45-
throw new ArgumentException(String.Format("Please provide Container of containerType as Windows and backupManagementType as MARS. Provided Container has containerType {0} and backupManagementType {1} which is invalid.", Container.ContainerType, Container.BackupManagementType));
46+
throw new ArgumentException(String.Format(Resources.UnsupportedContainerException, Container.ContainerType, Container.BackupManagementType));
4647
}
4748
AzureRmRecoveryServicesMabContainer mabContainer = Container as AzureRmRecoveryServicesMabContainer;
4849
string containerName = mabContainer.FriendlyName;

0 commit comments

Comments
 (0)