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,