1 /******************************************************************************
3 * Copyright (c) 2003 Novell Inc. www.novell.com
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:
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
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
22 *******************************************************************************/
24 // Novell.Directory.Ldap.LdapLocalException.cs
27 // Sunil Kumar (Sunilk@novell.com)
29 // (C) 2003 Novell, Inc (http://www.novell.com)
34 namespace Novell.Directory.Ldap
37 /// <summary> Represents an Ldap exception that is not a result of a server response.</summary>
38 public class LdapLocalException:LdapException
40 /// <summary> Constructs a default exception with no specific error information.</summary>
41 public LdapLocalException():base()
46 /// <summary> Constructs a local exception with a detailed message obtained from the
47 /// specified <code>MessageOrKey</code> String and the result code.
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.
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.
59 /// <param name="resultCode"> The result code returned.
61 public LdapLocalException(System.String messageOrKey, int resultCode):base(messageOrKey, resultCode, (System.String) null)
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.
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.
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.
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.
83 /// <param name="arguments"> The modifying arguments to be included in the
87 /// <param name="resultCode"> The result code returned.
89 public LdapLocalException(System.String messageOrKey, System.Object[] arguments, int resultCode):base(messageOrKey, arguments, resultCode, (System.String) null)
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.
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.
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.
109 /// <param name="resultCode"> The result code returned.
112 /// <param name="rootException"> A throwable which is the underlying cause
113 /// of the LdapException.
115 public LdapLocalException(System.String messageOrKey, int resultCode, System.Exception rootException):base(messageOrKey, resultCode, null, rootException)
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
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.
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.
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.
139 /// <param name="arguments"> The modifying arguments to be included in the
143 /// <param name="resultCode"> The result code returned.
146 /// <param name="rootException"> A throwable which is the underlying cause
147 /// of the LdapException.
149 public LdapLocalException(System.String messageOrKey, System.Object[] arguments, int resultCode, System.Exception rootException):base(messageOrKey, arguments, resultCode, null, rootException)
154 /// <summary> returns a string of information about the exception and the
155 /// the nested exceptions, if any.
157 public override System.String ToString()
159 // Format the basic exception information
160 return getExceptionString("LdapLocalException");