From c232a6f5e3c3acd79126d29d1d53615f0869424e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Hofman?= Date: Tue, 30 Jan 2024 17:12:31 +0100 Subject: [PATCH] Reverting last commit change as it doesn't work for NET 4.7.* --- Snowflake.Data/Client/SnowflakeDbException.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Snowflake.Data/Client/SnowflakeDbException.cs b/Snowflake.Data/Client/SnowflakeDbException.cs index 9b9f0e0a9..f7677fae8 100755 --- a/Snowflake.Data/Client/SnowflakeDbException.cs +++ b/Snowflake.Data/Client/SnowflakeDbException.cs @@ -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; } private int VendorCode; public string QueryId { get; set; } @@ -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; } @@ -63,7 +61,7 @@ public SnowflakeDbException(string sqlState, SFError error, params object[] args : base(FormatExceptionMessage(error, args, sqlState, string.Empty)) { VendorCode = error.GetAttribute().errorCode; - _sqlState = sqlState; + SqlState = sqlState; } public SnowflakeDbException(Exception innerException, SFError error, params object[] args) @@ -76,7 +74,7 @@ public SnowflakeDbException(Exception innerException, string sqlState, SFError e : base(FormatExceptionMessage(error, args, sqlState, string.Empty), innerException) { VendorCode = error.GetAttribute().errorCode; - _sqlState = sqlState; + SqlState = sqlState; } static string FormatExceptionMessage(SFError error,