(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / class / Mono.Data.SybaseClient / Mono.Data.SybaseClient / SybaseError.cs
blobcf978b235f632ce4a62f72b76fe8c7a753a50eee
1 //
2 // Mono.Data.SybaseClient.SybaseError.cs
3 //
4 // Author:
5 // Tim Coleman (tim@timcoleman.com)
6 //
7 // Copyright (C) Tim Coleman, 2002
8 //
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.
31 using System;
32 using System.Data;
33 using System.Runtime.InteropServices;
35 namespace Mono.Data.SybaseClient {
36 [MonoTODO]
37 public sealed class SybaseError
39 #region Fields
41 byte theClass = 0;
42 int lineNumber = 0;
43 string message = "";
44 int number = 0;
45 string procedure = "";
46 string server = "";
47 string source = "";
48 byte state = 0;
50 #endregion // Fields
52 #region Constructors
54 internal SybaseError(byte theClass, int lineNumber,
55 string message, int number, string procedure,
56 string server, string source, byte state) {
57 this.theClass = theClass;
58 this.lineNumber = lineNumber;
59 this.message = message;
60 this.number = number;
61 this.procedure = procedure;
62 this.server = server;
63 this.source = source;
64 this.state = state;
67 #endregion // Constructors
69 #region Properties
71 [MonoTODO]
72 public byte Class {
73 get { return theClass; }
76 [MonoTODO]
77 public int LineNumber {
78 get { return lineNumber; }
81 [MonoTODO]
82 public string Message {
83 get { return message; }
86 [MonoTODO]
87 public int Number {
88 get { return number; }
91 [MonoTODO]
92 public string Procedure {
93 get { return procedure; }
96 [MonoTODO]
97 public string Server {
98 get { return server; }
101 [MonoTODO]
102 public string Source {
103 get { return source; }
106 [MonoTODO]
107 public byte State {
108 get { return state; }
111 #endregion // Properties
113 #region Methods
115 internal void SetClass (byte theClass) {
116 this.theClass = theClass;
119 internal void SetLineNumber (int lineNumber) {
120 this.lineNumber = lineNumber;
123 internal void SetMessage (string message) {
124 this.message = message;
127 internal void SetNumber (int number) {
128 this.number = number;
131 internal void SetProcedure (string procedure) {
132 this.procedure = procedure;
135 internal void SetServer (string server) {
136 this.server = server;
139 internal void SetSource (string source) {
140 this.source = source;
143 internal void SetState (byte state) {
144 this.state = state;
147 [MonoTODO]
148 public override string ToString ()
150 String toStr;
151 String stackTrace;
152 stackTrace = " <Stack Trace>";
153 // FIXME: generate the correct SQL error string
154 toStr = "SybaseError:" + message + stackTrace;
155 return toStr;
158 #endregion // Methods