This commit was manufactured by cvs2svn to create branch 'mono-1-0'.
[mono.git] / mcs / class / System.Data.OracleClient / System.Data.OracleClient / OracleException.cs
1 // 
2 // OracleException.cs
3 //
4 // Part of the Mono class libraries at
5 // mcs/class/System.Data.OracleClient/System.Data.OracleClient
6 //
7 // Assembly: System.Data.OracleClient.dll
8 // Namespace: System.Data.OracleClient
9 //
10 // Authors: 
11 //    Tim Coleman <tim@timcoleman.com>
12 //
13 // Copyright (C) Daniel Morgan, 2002
14 // Copyright (C) Tim Coleman , 2003
15 //
16 // Licensed under the MIT/X11 License.
17 //
18
19 using System;
20 using System.Runtime.Serialization;
21
22 namespace System.Data.OracleClient {
23         [Serializable]
24         public sealed class OracleException : SystemException
25         {
26                 #region Fields
27
28                 int code;
29                 string message;
30
31                 #endregion // Fields
32
33                 #region Constructors
34
35                 internal OracleException (int code, string message)
36                 {
37                         this.code = code;
38                         this.message = message;
39                 }
40
41                 private OracleException (SerializationInfo si, StreamingContext sc) : base(si, sc)
42                 {
43                         message = si.GetString ("message");
44                         code = si.GetInt32 ("source");
45                 }
46
47                 #endregion // Constructors
48
49                 #region Properties
50
51                 public int Code {
52                         get { return code; }
53                 }
54
55                 public override string Message {
56                         get { return message; }
57                 }
58
59                 #endregion // Properties
60         }
61 }