Skip to content

Commit

Permalink
Reverting last commit change as it doesn't work for NET 4.7.*
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-mhofman committed Jan 31, 2024
1 parent a3e96d5 commit c232a6f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Snowflake.Data/Client/SnowflakeDbException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ public sealed class SnowflakeDbException : DbException
static private ResourceManager rm = new ResourceManager("Snowflake.Data.Core.ErrorMessages",
typeof(SnowflakeDbException).Assembly);

private string _sqlState;
public override string SqlState => _sqlState;

public string SqlState { get; private set; }

Check warning on line 26 in Snowflake.Data/Client/SnowflakeDbException.cs

View workflow job for this annotation

GitHub Actions / Tests on Linux (net6.0, AZURE)

'SnowflakeDbException.SqlState' hides inherited member 'DbException.SqlState'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.

Check warning on line 26 in Snowflake.Data/Client/SnowflakeDbException.cs

View workflow job for this annotation

GitHub Actions / Tests on Linux (net6.0, AWS)

'SnowflakeDbException.SqlState' hides inherited member 'DbException.SqlState'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.

Check warning on line 26 in Snowflake.Data/Client/SnowflakeDbException.cs

View workflow job for this annotation

GitHub Actions / Tests on Linux (net6.0, GCP)

'SnowflakeDbException.SqlState' hides inherited member 'DbException.SqlState'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.

Check warning on line 26 in Snowflake.Data/Client/SnowflakeDbException.cs

View workflow job for this annotation

GitHub Actions / Tests on MAC (net6.0, GCP)

'SnowflakeDbException.SqlState' hides inherited member 'DbException.SqlState'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.

Check warning on line 26 in Snowflake.Data/Client/SnowflakeDbException.cs

View workflow job for this annotation

GitHub Actions / Tests on MAC (net6.0, AWS)

'SnowflakeDbException.SqlState' hides inherited member 'DbException.SqlState'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.

Check warning on line 26 in Snowflake.Data/Client/SnowflakeDbException.cs

View workflow job for this annotation

GitHub Actions / Tests on MAC (net6.0, AZURE)

'SnowflakeDbException.SqlState' hides inherited member 'DbException.SqlState'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.

Check warning on line 26 in Snowflake.Data/Client/SnowflakeDbException.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net6.0, AZURE)

'SnowflakeDbException.SqlState' hides inherited member 'DbException.SqlState'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.

Check warning on line 26 in Snowflake.Data/Client/SnowflakeDbException.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net6.0, AWS)

'SnowflakeDbException.SqlState' hides inherited member 'DbException.SqlState'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.

Check warning on line 26 in Snowflake.Data/Client/SnowflakeDbException.cs

View workflow job for this annotation

GitHub Actions / Tests on Windows (net6.0, GCP)

'SnowflakeDbException.SqlState' hides inherited member 'DbException.SqlState'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.
private int VendorCode;

public string QueryId { get; set; }
Expand All @@ -41,7 +39,7 @@ public override int ErrorCode
public SnowflakeDbException(string sqlState, int vendorCode, string errorMessage, string queryId)
: base(FormatExceptionMessage(errorMessage, vendorCode, sqlState, queryId))
{
_sqlState = sqlState;
SqlState = sqlState;
VendorCode = vendorCode;
QueryId = queryId;
}
Expand All @@ -63,7 +61,7 @@ public SnowflakeDbException(string sqlState, SFError error, params object[] args
: base(FormatExceptionMessage(error, args, sqlState, string.Empty))
{
VendorCode = error.GetAttribute<SFErrorAttr>().errorCode;
_sqlState = sqlState;
SqlState = sqlState;
}

public SnowflakeDbException(Exception innerException, SFError error, params object[] args)
Expand All @@ -76,7 +74,7 @@ public SnowflakeDbException(Exception innerException, string sqlState, SFError e
: base(FormatExceptionMessage(error, args, sqlState, string.Empty), innerException)
{
VendorCode = error.GetAttribute<SFErrorAttr>().errorCode;
_sqlState = sqlState;
SqlState = sqlState;
}

static string FormatExceptionMessage(SFError error,
Expand Down

0 comments on commit c232a6f

Please sign in to comment.