1 karl 1.78 //%2004////////////////////////////////////////////////////////////////////////
|
2 mike 1.22 //
|
3 karl 1.78 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
4 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
|
6 karl 1.73 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.78 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
8 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
|
9 mike 1.22 //
10 // Permission is hereby granted, free of charge, to any person obtaining a copy
|
11 chip 1.40 // of this software and associated documentation files (the "Software"), to
12 // deal in the Software without restriction, including without limitation the
13 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
14 mike 1.22 // sell copies of the Software, and to permit persons to whom the Software is
15 // furnished to do so, subject to the following conditions:
|
16 kumpf 1.43 //
|
17 chip 1.40 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
|
18 mike 1.22 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
19 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
20 chip 1.40 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
21 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
23 mike 1.22 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 //
26 //==============================================================================
27 //
28 //%/////////////////////////////////////////////////////////////////////////////
29
30 #ifndef Pegasus_Exception_h
31 #define Pegasus_Exception_h
32
33 #include <Pegasus/Common/Config.h>
34 #include <Pegasus/Common/String.h>
35 #include <Pegasus/Common/CIMStatusCode.h>
|
36 chuck 1.69 #include <Pegasus/Common/MessageLoader.h> // l10n
|
37 kumpf 1.46 #include <Pegasus/Common/Linkage.h>
|
38 chuck 1.69 #include <Pegasus/Common/ContentLanguages.h> // l10n
|
39 mike 1.22
40 PEGASUS_NAMESPACE_BEGIN
|
41 kumpf 1.68 class ExceptionRep;
|
42 kumpf 1.44
|
43 kumpf 1.68 /**
|
44 kumpf 1.44 <p>The <tt>Exception</tt> class is the parent class for all
45 exceptions that can be generated by any component of the
46 Pegasus infrastructure. It includes not only the CIM exceptions
47 that are defined by the DMTF, but also various exceptions that
48 may occur during the processing of functions called by clients
49 and providers.</p>
|
50 mike 1.22 */
51 class PEGASUS_COMMON_LINKAGE Exception
52 {
53 public:
54
|
55 kumpf 1.68 ///
|
56 mike 1.22 Exception(const String& message);
57
|
58 kumpf 1.68 ///
|
59 kumpf 1.65 Exception(const Exception& exception);
60
|
61 chuck 1.69 // l10n
|
62 chuck 1.72 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
|
63 chuck 1.78.4.2 /** <I><B>Experimental Interface</B></I><BR>
64 */
|
65 chuck 1.69 Exception(const MessageLoaderParms& msgParms);
|
66 chuck 1.72 #endif
|
67 chuck 1.69
|
68 kumpf 1.68 ///
|
69 kumpf 1.58 virtual ~Exception();
|
70 mike 1.22
|
71 kumpf 1.68 ///
|
72 kumpf 1.62 virtual const String& getMessage() const;
|
73 chuck 1.69
74 // l10n
|
75 chuck 1.72 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
76 // Note: Rlse 2.3 - not virtual to preserve binary compatibility.
|
77 denise.eckstein 1.77 /** <I><B>Experimental Interface</B></I><BR>
78 */
|
79 chuck 1.72 const ContentLanguages& getContentLanguages() const;
|
80 chuck 1.69
|
81 chuck 1.72 // Note: Rlse 2.3 - not virtual to preserve binary compatibility.
|
82 denise.eckstein 1.77 /** <I><B>Experimental Interface</B></I><BR>
83 */
|
84 chuck 1.72 void setContentLanguages(const ContentLanguages& langs);
85 #endif
|
86 mike 1.22
87 protected:
88
|
89 kumpf 1.65 Exception();
90
91 ExceptionRep * _rep;
|
92 mike 1.22 };
93
|
94 kumpf 1.68 ///
|
95 kumpf 1.60 class PEGASUS_COMMON_LINKAGE IndexOutOfBoundsException : public Exception
|
96 mike 1.22 {
97 public:
|
98 kumpf 1.68 ///
|
99 kumpf 1.60 IndexOutOfBoundsException();
|
100 mike 1.22 };
101
|
102 kumpf 1.68 ///
|
103 kumpf 1.60 class PEGASUS_COMMON_LINKAGE AlreadyExistsException : public Exception
|
104 mike 1.22 {
105 public:
|
106 kumpf 1.68 ///
|
107 kumpf 1.60 AlreadyExistsException(const String& message);
|
108 chuck 1.72 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
|
109 denise.eckstein 1.77 /** <I><B>Experimental Interface</B></I><BR>
110 */
|
111 chuck 1.70 AlreadyExistsException(MessageLoaderParms& msgParms);
|
112 chuck 1.72 #endif
|
113 mike 1.22 };
114
|
115 kumpf 1.68 ///
|
116 kumpf 1.58 class PEGASUS_COMMON_LINKAGE InvalidNameException : public Exception
|
117 mike 1.22 {
118 public:
|
119 kumpf 1.68 ///
|
120 kumpf 1.58 InvalidNameException(const String& name);
|
121 chuck 1.72 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
|
122 denise.eckstein 1.77 /** <I><B>Experimental Interface</B></I><BR>
123 */
|
124 chuck 1.72 InvalidNameException(MessageLoaderParms& msgParms);
125 #endif
|
126 kumpf 1.47 };
127
|
128 kumpf 1.68 ///
|
129 kumpf 1.58 class PEGASUS_COMMON_LINKAGE InvalidNamespaceNameException : public Exception
|
130 kumpf 1.47 {
131 public:
|
132 kumpf 1.68 ///
|
133 kumpf 1.58 InvalidNamespaceNameException(const String& name);
|
134 chuck 1.72 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
|
135 denise.eckstein 1.77 /** <I><B>Experimental Interface</B></I><BR>
136 */
|
137 chuck 1.72 InvalidNamespaceNameException(MessageLoaderParms& msgParms);
138 #endif
|
139 mike 1.22 };
140
|
141 kumpf 1.68 ///
|
142 kumpf 1.60 class PEGASUS_COMMON_LINKAGE UninitializedObjectException : public Exception
|
143 mike 1.22 {
144 public:
|
145 kumpf 1.68 ///
|
146 kumpf 1.60 UninitializedObjectException();
|
147 mike 1.22 };
148
|
149 kumpf 1.68 ///
|
150 kumpf 1.60 class PEGASUS_COMMON_LINKAGE TypeMismatchException : public Exception
|
151 mike 1.22 {
152 public:
|
153 kumpf 1.68 ///
|
154 kumpf 1.60 TypeMismatchException();
|
155 marek 1.75 TypeMismatchException(const String& message);
156 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
|
157 denise.eckstein 1.77 /** <I><B>Experimental Interface</B></I><BR>
158 */
|
159 marek 1.75 TypeMismatchException(MessageLoaderParms& msgParms);
160 #endif
161
|
162 mike 1.22 };
|
163 karl 1.26
|
164 kumpf 1.68 ///
|
165 kumpf 1.60 class PEGASUS_COMMON_LINKAGE DynamicCastFailedException : public Exception
|
166 mike 1.24 {
167 public:
|
168 kumpf 1.68 ///
|
169 kumpf 1.60 DynamicCastFailedException();
|
170 mike 1.24 };
171
|
172 kumpf 1.68 ///
|
173 kumpf 1.60 class PEGASUS_COMMON_LINKAGE InvalidDateTimeFormatException : public Exception
|
174 mike 1.22 {
175 public:
|
176 kumpf 1.68 ///
|
177 kumpf 1.60 InvalidDateTimeFormatException();
|
178 mike 1.23 };
179
|
180 kumpf 1.68 ///
|
181 kumpf 1.58 class PEGASUS_COMMON_LINKAGE MalformedObjectNameException : public Exception
|
182 mike 1.22 {
183 public:
|
184 kumpf 1.68 ///
|
185 kumpf 1.58 MalformedObjectNameException(const String& objectName);
|
186 chuck 1.72 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
|
187 denise.eckstein 1.77 /** <I><B>Experimental Interface</B></I><BR>
188 */
|
189 chuck 1.72 MalformedObjectNameException(MessageLoaderParms& msgParms);
190 #endif
|
191 mike 1.22 };
192
|
193 kumpf 1.68 ///
|
194 kumpf 1.54 class PEGASUS_COMMON_LINKAGE BindFailedException : public Exception
|
195 mike 1.22 {
196 public:
|
197 kumpf 1.68 ///
|
198 kumpf 1.58 BindFailedException(const String& message);
|
199 chuck 1.72 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
|
200 denise.eckstein 1.77 /** <I><B>Experimental Interface</B></I><BR>
201 */
|
202 chuck 1.72 BindFailedException(MessageLoaderParms& msgParms);
203 #endif
|
204 mike 1.22 };
205
|
206 kumpf 1.68 ///
|
207 kumpf 1.54 class PEGASUS_COMMON_LINKAGE InvalidLocatorException : public Exception
|
208 mike 1.22 {
209 public:
|
210 kumpf 1.68 ///
|
211 kumpf 1.58 InvalidLocatorException(const String& locator);
|
212 chuck 1.72 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
|
213 denise.eckstein 1.77 /** <I><B>Experimental Interface</B></I><BR>
214 */
|
215 chuck 1.72 InvalidLocatorException(MessageLoaderParms& msgParms);
216 #endif
|
217 mike 1.22 };
218
|
219 kumpf 1.68 ///
|
220 kumpf 1.54 class PEGASUS_COMMON_LINKAGE CannotCreateSocketException : public Exception
|
221 mike 1.22 {
222 public:
|
223 kumpf 1.68 ///
|
224 kumpf 1.58 CannotCreateSocketException();
|
225 mike 1.22 };
226
|
227 kumpf 1.68 ///
|
228 kumpf 1.54 class PEGASUS_COMMON_LINKAGE CannotConnectException : public Exception
|
229 mike 1.22 {
230 public:
|
231 kumpf 1.68 ///
232 CannotConnectException(const String& message);
|
233 chuck 1.72 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
|
234 denise.eckstein 1.77 /** <I><B>Experimental Interface</B></I><BR>
235 */
|
236 chuck 1.72 CannotConnectException(MessageLoaderParms& msgParms);
237 #endif
|
238 mike 1.22 };
239
|
240 kumpf 1.68 ///
|
241 kumpf 1.54 class PEGASUS_COMMON_LINKAGE AlreadyConnectedException: public Exception
|
242 mike 1.22 {
243 public:
|
244 kumpf 1.68 ///
|
245 kumpf 1.58 AlreadyConnectedException();
|
246 mike 1.22 };
247
|
248 kumpf 1.68 ///
|
249 kumpf 1.54 class PEGASUS_COMMON_LINKAGE NotConnectedException: public Exception
|
250 mike 1.22 {
251 public:
|
252 kumpf 1.68 ///
|
253 kumpf 1.58 NotConnectedException();
|
254 mike 1.22 };
255
|
256 kumpf 1.68 ///
|
257 kumpf 1.54 class PEGASUS_COMMON_LINKAGE ConnectionTimeoutException: public Exception
|
258 mike 1.22 {
259 public:
|
260 kumpf 1.68 ///
|
261 kumpf 1.58 ConnectionTimeoutException();
|
262 mike 1.22 };
263
|
264 kumpf 1.68 ///
|
265 kumpf 1.54 class PEGASUS_COMMON_LINKAGE SSLException: public Exception
|
266 mike 1.22 {
267 public:
|
268 kumpf 1.68 ///
|
269 kumpf 1.58 SSLException(const String& message);
|
270 chuck 1.72 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
|
271 denise.eckstein 1.77 /** <I><B>Experimental Interface</B></I><BR>
272 */
|
273 chuck 1.72 SSLException(MessageLoaderParms& msgParms);
274 #endif
|
275 mike 1.22 };
276
|
277 kumpf 1.68 ///
|
278 kumpf 1.67 class PEGASUS_COMMON_LINKAGE DateTimeOutOfRangeException : public Exception
279 {
280 public:
|
281 kumpf 1.68 ///
|
282 chuck 1.69 DateTimeOutOfRangeException(const String& message);
|
283 chuck 1.72 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
|
284 denise.eckstein 1.77 /** <I><B>Experimental Interface</B></I><BR>
285 */
|
286 chuck 1.72 DateTimeOutOfRangeException(MessageLoaderParms& msgParms);
287 #endif
|
288 kumpf 1.67 };
|
289 kumpf 1.54
|
290 chip 1.40 /** The CIMException defines the CIM exceptions that are formally defined in
|
291 mike 1.22 the CIM Operations over HTTP specification.
292 */
293 class PEGASUS_COMMON_LINKAGE CIMException : public Exception
294 {
295 public:
296
|
297 kumpf 1.68 ///
|
298 mike 1.22 CIMException(
|
299 kumpf 1.32 CIMStatusCode code = CIM_ERR_SUCCESS,
|
300 kumpf 1.56 const String& message = String::EMPTY);
|
301 chuck 1.69
302 // l10n
|
303 chuck 1.72 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
|
304 denise.eckstein 1.77 /** <I><B>Experimental Interface</B></I><BR>
305 */
|
306 chuck 1.69 CIMException(
307 CIMStatusCode code,
|
308 chuck 1.72 const MessageLoaderParms& msgParms);
309 #endif
|
310 kumpf 1.56
|
311 kumpf 1.68 ///
|
312 kumpf 1.56 CIMException(const CIMException & cimException);
313
|
314 kumpf 1.68 ///
|
315 kumpf 1.65 CIMException& operator=(const CIMException & cimException);
316
|
317 kumpf 1.68 ///
|
318 kumpf 1.56 virtual ~CIMException();
319
|
320 kumpf 1.68 ///
|
321 kumpf 1.56 CIMStatusCode getCode() const;
|
322 mike 1.22 };
323
324
|
325 kumpf 1.55 PEGASUS_NAMESPACE_END
326
|
327 mike 1.22 #endif /* Pegasus_Exception_h */
|