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