2007-07-22 Nagappan A <anagappan@novell.com>
[mono.git] / mcs / class / Mono.Data.Tds / Mono.Data.Tds.Protocol / TdsInternalException.cs
1 //
2 // Mono.Data.Tds.Protocol.TdsInternalException.cs
3 //
4 // Author:
5 //   Tim Coleman (tim@timcoleman.com)
6 //
7 // Copyright (C) 2002 Tim Coleman
8 //
9
10 //
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
18 // 
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
21 // 
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30
31 using System;
32 using System.Runtime.Serialization;
33
34 namespace Mono.Data.Tds.Protocol {
35         public class TdsInternalException : SystemException
36         {
37                 #region Fields
38
39                 byte theClass;
40                 int lineNumber;
41                 int number;
42                 string procedure;
43                 string server;
44                 string source;
45                 byte state;
46
47                 #endregion // Fields
48
49                 #region Constructors
50
51                 internal TdsInternalException ()
52                        : base ("a TDS Exception has occurred.")
53                 {
54                 }
55
56                 internal TdsInternalException (string message, Exception innerException)
57                         : base (message, innerException)
58                 {
59                 }
60
61                 internal TdsInternalException (byte theClass, int lineNumber, string message, int number, string procedure, string server, string source, byte state)
62                         : base (message)
63                 {
64                         this.theClass = theClass;
65                         this.lineNumber = lineNumber;
66                         this.number = number;
67                         this.procedure = procedure;
68                         this.server = server;
69                         this.source = source;
70                         this.state = state;
71                 }
72
73                 #endregion // Constructors
74
75                 #region Properties
76
77                 public byte Class {
78                         get { return theClass; }
79                 }
80
81                 public int LineNumber {
82                         get { return lineNumber; }
83                 }
84
85                 public override string Message {
86                         get { return base.Message; }
87                 }
88
89                 public int Number {
90                         get { return number; }
91                 }
92
93                 public string Procedure {
94                         get { return procedure; }
95                 }
96
97                 public string Server {
98                         get { return server; }
99                 }
100
101                 public override string Source {
102                         get { return source; }
103                 }
104
105                 public byte State {
106                         get { return state; }
107                 }
108
109                 #endregion // Properties
110
111                 #region Methods
112
113                 [MonoTODO]
114                 public override void GetObjectData (SerializationInfo si, StreamingContext context)
115                 {
116                         throw new NotImplementedException ();
117                 }
118
119                 #endregion // Methods
120         }
121 }