Fixed Azure Pipeline build warnings (#1254)

* Fixed Azure Pipeline build warnings

* Removed variable declaration in SmoScriptableOperationWithFullDbAccess catch block.
This commit is contained in:
Justin M
2021-10-04 13:30:43 -07:00
committed by GitHub
parent 3442c08012
commit 0c95a511d0
10 changed files with 23 additions and 60 deletions

View File

@@ -11,7 +11,6 @@ using Microsoft.Data.SqlClient;
using Microsoft.SqlServer.Management.Common;
using Microsoft.SqlServer.Management.Sdk.Sfc;
using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlTools.ServiceLayer.Admin;
using Microsoft.SqlTools.ServiceLayer.DisasterRecovery.Contracts;
using Microsoft.SqlTools.ServiceLayer.Management;
using Microsoft.SqlTools.ServiceLayer.TaskServices;
@@ -453,10 +452,6 @@ namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery
result = constDeviceTypeMediaSet;
}
}
catch (Exception ex)
{
throw ex;
}
finally
{
this.serverConnection.SqlExecutionModes = executionMode;

View File

@@ -12,7 +12,6 @@ using Microsoft.SqlServer.Management.Common;
using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlTools.ServiceLayer.DisasterRecovery.Contracts;
using Microsoft.SqlTools.ServiceLayer.TaskServices;
using Microsoft.SqlTools.ServiceLayer.Utility;
using Microsoft.SqlTools.Utility;
using Microsoft.SqlTools.ServiceLayer.Connection;
using System.Diagnostics;
@@ -318,7 +317,7 @@ namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery.RestoreOperation
catch(Exception ex)
{
Logger.Write(TraceEventType.Information, $"Failed to execute restore task. error: {ex.Message}");
throw ex;
throw;
}
finally
{