1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
6 using System
.Data
.Common
;
7 using System
.Data
.SqlClient
;
8 using System
.Runtime
.Serialization
;
10 namespace System
.Data
.SqlClient
12 public class SqlException
: DbException
14 const string EXCEPTION_MESSAGE
= "System.Data.SqlClient.SqlException is not supported on the current platform.";
16 internal bool _doNotReconnect
;
18 static internal SqlException
CreateException(SqlErrorCollection errorCollection
, string serverVersion
)
19 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
21 static internal SqlException
CreateException(SqlErrorCollection errorCollection
, string serverVersion
, SqlInternalConnectionTds internalConnection
, Exception innerException
= null)
22 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
24 static internal SqlException
CreateException(SqlErrorCollection errorCollection
, string serverVersion
, Guid conId
, Exception innerException
= null)
25 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
29 public override void GetObjectData (SerializationInfo si
, StreamingContext context
)
30 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
33 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
35 public Guid ClientConnectionId
36 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
38 public SqlErrorCollection Errors
39 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
42 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
44 public override string Message
45 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
48 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
50 public string Procedure
51 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
54 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
56 public override string Source
57 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
60 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
62 internal SqlException
InternalClone()
63 => throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);