Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / class / Novell.Directory.Ldap / Novell.Directory.Ldap / LdapLocalException.cs
1 /******************************************************************************
2 * The MIT License
3 * Copyright (c) 2003 Novell Inc.  www.novell.com
4
5 * Permission is hereby granted, free of charge, to any person obtaining  a copy
6 * of this software and associated documentation files (the Software), to deal
7 * in the Software without restriction, including  without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
9 * copies of the Software, and to  permit persons to whom the Software is 
10 * furnished to do so, subject to the following conditions:
11
12 * The above copyright notice and this permission notice shall be included in 
13 * all copies or substantial portions of the Software.
14
15 * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 * SOFTWARE.
22 *******************************************************************************/
23 //
24 // Novell.Directory.Ldap.LdapLocalException.cs
25 //
26 // Author:
27 //   Sunil Kumar (Sunilk@novell.com)
28 //
29 // (C) 2003 Novell, Inc (http://www.novell.com)
30 //
31
32 using System;
33
34 namespace Novell.Directory.Ldap
35 {
36         
37         /// <summary>  Represents an Ldap exception that is not a result of a server response.</summary>
38         public class LdapLocalException:LdapException
39         {
40                 /// <summary> Constructs a default exception with no specific error information.</summary>
41                 public LdapLocalException():base()
42                 {
43                         return ;
44                 }
45                 
46                 /// <summary> Constructs a local exception with a detailed message obtained from the
47                 /// specified <code>MessageOrKey</code> String and the result code.
48                 /// 
49                 /// The String is used either as a message key to obtain a localized
50                 /// messsage from ExceptionMessages, or if there is no key in the
51                 /// resource matching the text, it is used as the detailed message itself.
52                 /// 
53                 /// </summary>
54                 /// <param name="messageOrKey"> Key to addition result information, a key into
55                 /// ExceptionMessages, or the information
56                 /// itself if the key doesn't exist.
57                 /// 
58                 /// </param>
59                 /// <param name="resultCode">   The result code returned.
60                 /// </param>
61                 public LdapLocalException(System.String messageOrKey, int resultCode):base(messageOrKey, resultCode, (System.String) null)
62                 {
63                         return ;
64                 }
65                 
66                 /// <summary> Constructs a local exception with a detailed message obtained from the
67                 /// specified <code>MessageOrKey</code> String and modifying arguments.
68                 /// Additional parameters specify the result code.
69                 /// 
70                 /// The String is used either as a message key to obtain a localized
71                 /// messsage from ExceptionMessages, or if there is no key in the
72                 /// resource matching the text, it is used as the detailed message itself.
73                 /// 
74                 /// The message in the default locale is built with the supplied arguments,
75                 /// which are saved to be used for building messages for other locales.
76                 /// 
77                 /// </summary>
78                 /// <param name="messageOrKey"> Key to addition result information, a key into
79                 /// ExceptionMessages, or the information
80                 /// itself if the key doesn't exist.
81                 /// 
82                 /// </param>
83                 /// <param name="arguments">   The modifying arguments to be included in the
84                 /// message string.
85                 /// 
86                 /// </param>
87                 /// <param name="resultCode">   The result code returned.
88                 /// </param>
89                 public LdapLocalException(System.String messageOrKey, System.Object[] arguments, int resultCode):base(messageOrKey, arguments, resultCode, (System.String) null)
90                 {
91                         return ;
92                 }
93                 
94                 /// <summary> Constructs a local exception with a detailed message obtained from the
95                 /// specified <code>MessageOrKey</code> String.
96                 /// Additional parameters specify the result code and a rootException which
97                 /// is the underlying cause of an error on the client.
98                 /// 
99                 /// The String is used either as a message key to obtain a localized
100                 /// messsage from ExceptionMessages, or if there is no key in the
101                 /// resource matching the text, it is used as the detailed message itself.
102                 /// 
103                 /// </summary>
104                 /// <param name="messageOrKey"> Key to addition result information, a key into
105                 /// ExceptionMessages, or the information
106                 /// itself if the key doesn't exist.
107                 /// 
108                 /// </param>
109                 /// <param name="resultCode">   The result code returned.
110                 /// 
111                 /// </param>
112                 /// <param name="rootException"> A throwable which is the underlying cause
113                 /// of the LdapException.
114                 /// </param>
115                 public LdapLocalException(System.String messageOrKey, int resultCode, System.Exception rootException):base(messageOrKey, resultCode, null, rootException)
116                 {
117                         return ;
118                 }
119                 
120                 /// <summary> Constructs a local exception with a detailed message obtained from the
121                 /// specified <code>MessageOrKey</code> String and modifying arguments.
122                 /// Additional parameters specify the result code
123                 /// and a rootException which is the underlying cause of an error
124                 /// on the client.
125                 /// 
126                 /// The String is used either as a message key to obtain a localized
127                 /// messsage from ExceptionMessages, or if there is no key in the
128                 /// resource matching the text, it is used as the detailed message itself.
129                 /// 
130                 /// The message in the default locale is built with the supplied arguments,
131                 /// which are saved to be used for building messages for other locales.
132                 /// 
133                 /// </summary>
134                 /// <param name="messageOrKey"> Key to addition result information, a key into
135                 /// ExceptionMessages, or the information
136                 /// itself if the key doesn't exist.
137                 /// 
138                 /// </param>
139                 /// <param name="arguments">   The modifying arguments to be included in the
140                 /// message string.
141                 /// 
142                 /// </param>
143                 /// <param name="resultCode">   The result code returned.
144                 /// 
145                 /// </param>
146                 /// <param name="rootException"> A throwable which is the underlying cause
147                 /// of the LdapException.
148                 /// </param>
149                 public LdapLocalException(System.String messageOrKey, System.Object[] arguments, int resultCode, System.Exception rootException):base(messageOrKey, arguments, resultCode, null, rootException)
150                 {
151                         return ;
152                 }
153                 
154                 /// <summary> returns a string of information about the exception and the
155                 /// the nested exceptions, if any.
156                 /// </summary>
157                 public override System.String ToString()
158                 {
159                         // Format the basic exception information
160                         return getExceptionString("LdapLocalException");
161                 }
162         }
163 }