5 // Rolf Bjarne Kvinge <rolf@xamarin.com>
7 // Copyright (c) 2016 Xamarin, Inc.
9 // Permission is hereby granted, free of charge, to any person obtaining a copy
10 // of this software and associated documentation files (the "Software"), to deal
11 // in the Software without restriction, including without limitation the rights
12 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 // copies of the Software, and to permit persons to whom the Software is
14 // furnished to do so, subject to the following conditions:
16 // The above copyright notice and this permission notice shall be included in
17 // all copies or substantial portions of the Software.
19 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28 using System
.Data
.Common
;
29 using System
.Data
.SqlClient
;
30 using System
.Runtime
.Serialization
;
32 namespace System
.Data
.SqlClient
34 public class SqlException
: DbException
36 const string EXCEPTION_MESSAGE
= "System.Data.SqlClient.SqlException is not supported on the current platform.";
38 internal bool _doNotReconnect
;
40 static internal SqlException
CreateException(SqlErrorCollection errorCollection
, string serverVersion
)
42 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
45 static internal SqlException
CreateException(SqlErrorCollection errorCollection
, string serverVersion
, SqlInternalConnectionTds internalConnection
, Exception innerException
= null)
47 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
50 static internal SqlException
CreateException(SqlErrorCollection errorCollection
, string serverVersion
, Guid conId
, Exception innerException
= null)
52 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
57 public override void GetObjectData (SerializationInfo si
, StreamingContext context
)
59 throw new PlatformNotSupportedException (EXCEPTION_MESSAGE
);
63 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
66 public Guid ClientConnectionId
{
67 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
70 public SqlErrorCollection Errors
{
71 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
74 public int LineNumber
{
75 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
78 public override string Message
{
79 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
83 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
86 public string Procedure
{
87 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
90 public string Server
{
91 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
94 public override string Source
{
95 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
99 get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }