1 martin 1.30 //%LICENSE////////////////////////////////////////////////////////////////
|
2 martin 1.31 //
|
3 martin 1.30 // Licensed to The Open Group (TOG) under one or more contributor license
4 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
5 // this work for additional information regarding copyright ownership.
6 // Each contributor licenses this file to you under the OpenPegasus Open
7 // Source License; you may not use this file except in compliance with the
8 // License.
|
9 martin 1.31 //
|
10 martin 1.30 // Permission is hereby granted, free of charge, to any person obtaining a
11 // copy of this software and associated documentation files (the "Software"),
12 // to deal in the Software without restriction, including without limitation
13 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 // and/or sell copies of the Software, and to permit persons to whom the
15 // Software is furnished to do so, subject to the following conditions:
|
16 martin 1.31 //
|
17 martin 1.30 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
|
19 martin 1.31 //
|
20 martin 1.30 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
21 martin 1.31 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22 martin 1.30 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27 martin 1.31 //
|
28 martin 1.30 //////////////////////////////////////////////////////////////////////////
|
29 mike 1.2 //
30 //%/////////////////////////////////////////////////////////////////////////////
31
32 #ifndef Pegasus_ProviderException_h
33 #define Pegasus_ProviderException_h
34
35 #include <Pegasus/Common/Config.h>
36 #include <Pegasus/Common/Exception.h>
|
37 kumpf 1.18 #include <Pegasus/Provider/Linkage.h>
|
38 mike 1.2
39 PEGASUS_NAMESPACE_BEGIN
40
|
41 kumpf 1.13 /**
|
42 kumpf 1.29 Base class for exceptions thrown by providers.
|
43 kumpf 1.13
|
44 kumpf 1.28 <p>The <tt>CIMOperationFailedException</tt> class is an exception class,
|
45 kumpf 1.29 and is the base class from which exceptions that can be thrown
|
46 kumpf 1.28 by providers are derived. It may also be thrown directly by
47 providers to signal a generic operation failure.</p>
48
49 <p>Providers do not throw every possible exception that clients
50 may receive from the CIM Server. The exceptions which may be thrown
51 by providers are a subset of the possible exceptions, and are
52 described in their respective sections.</p>
53
54 <p>All of the provider exceptions accept a <tt>message</tt>
55 argument that allows the provider to send additional text
56 in the string that will be returned to the client. While
57 localization of text is not currently supported, it is
58 recommended that text strings be structured in message
59 catalogs to facilitate future localization.</p>
|
60 kumpf 1.13 */
|
61 kumpf 1.17 class PEGASUS_PROVIDER_LINKAGE CIMOperationFailedException
62 : public CIMException
|
63 mike 1.2 {
64 public:
|
65 kumpf 1.13 /**
|
66 kumpf 1.29 Constructs a CIMOperationFailedException to indicate a generic
67 operation failure. This exception corresponds to the CIM_ERR_FAILED
68 status code.
69 @param message A message String containing an error description
|
70 kumpf 1.13 */
|
71 kumpf 1.28 CIMOperationFailedException(const String& message);
72
|
73 kumpf 1.27 #ifdef PEGASUS_INTERNALONLY
|
74 chuck 1.20 /*
75 <p>This exception will cause a <tt>CIM_ERR_FAILED</tt>
76 status code to be returned to the client.</p>
77 */
|
78 kumpf 1.28 CIMOperationFailedException(const MessageLoaderParms& parms);
|
79 chuck 1.21 #endif
|
80 kumpf 1.11
81 protected:
|
82 kumpf 1.29 /**
83 Constructs a CIMOperationFailedException with a specified status code
84 and error description.
85 @param code A CIMStatusCode containing a DMTF defined status code
86 specifying the type of the error
87 @param message A message String containing an error description
88 */
|
89 kumpf 1.28 CIMOperationFailedException(
90 const CIMStatusCode code,
91 const String& message);
92
|
93 kumpf 1.27 #ifdef PEGASUS_INTERNALONLY
94 CIMOperationFailedException(
95 const CIMStatusCode code,
|
96 kumpf 1.28 const MessageLoaderParms& parms);
|
97 chuck 1.21 #endif
|
98 mike 1.2 };
99
|
100 kumpf 1.13 /**
|
101 kumpf 1.29 A CIMAccessDeniedException indicates an access permission error.
102 This exception corresponds to the CIM_ERR_ACCESS_DENIED status code.
|
103 kumpf 1.13 */
|
104 kumpf 1.17 class PEGASUS_PROVIDER_LINKAGE CIMAccessDeniedException
105 : public CIMOperationFailedException
|
106 mike 1.2 {
107 public:
|
108 kumpf 1.29 /**
109 Constructs a CIMAccessDeniedException with a specified error message.
110 @param message A message String containing an error description
111 */
|
112 kumpf 1.28 CIMAccessDeniedException(const String& message);
113
|
114 kumpf 1.27 #ifdef PEGASUS_INTERNALONLY
|
115 kumpf 1.28 CIMAccessDeniedException(const MessageLoaderParms& parms);
|
116 chuck 1.21 #endif
|
117 mike 1.2 };
118
|
119 kumpf 1.13 /**
|
120 kumpf 1.29 A CIMInvalidParameterException indicates an error with an operation
121 parameter. This exception corresponds to the CIM_ERR_INVALID_PARAMETER
122 status code.
|
123 kumpf 1.13 */
|
124 kumpf 1.17 class PEGASUS_PROVIDER_LINKAGE CIMInvalidParameterException
125 : public CIMOperationFailedException
|
126 mike 1.2 {
127 public:
|
128 kumpf 1.29 /**
129 Constructs a CIMInvalidParameterException with a specified error
130 message.
131 @param message A message String containing an error description
132 */
|
133 kumpf 1.28 CIMInvalidParameterException(const String& message);
134
|
135 kumpf 1.27 #ifdef PEGASUS_INTERNALONLY
|
136 kumpf 1.28 CIMInvalidParameterException(const MessageLoaderParms& parms);
|
137 chuck 1.21 #endif
|
138 mike 1.2 };
139
|
140 kumpf 1.16 #if 0
|
141 kumpf 1.13 /**
|
142 kumpf 1.29 A CIMInvalidClassException indicates a class was specified that does not
143 exist. This exception corresponds to the CIM_ERR_INVALID_CLASS status
144 code.
|
145 kumpf 1.13 */
|
146 kumpf 1.17 class PEGASUS_PROVIDER_LINKAGE CIMInvalidClassException
147 : public CIMOperationFailedException
|
148 mike 1.2 {
149 public:
|
150 kumpf 1.29 /**
151 Constructs a CIMInvalidClassException with a specified error message.
152 @param message A message String containing an error description
153 */
|
154 kumpf 1.28 CIMInvalidClassException(const String& message);
155
|
156 kumpf 1.27 #ifdef PEGASUS_INTERNALONLY
|
157 kumpf 1.28 CIMInvalidClassException(const MessageLoaderParms& parms);
|
158 chuck 1.21 #endif
|
159 mike 1.2 };
|
160 kumpf 1.16 #endif
|
161 mike 1.2
|
162 kumpf 1.13 /**
|
163 kumpf 1.29 A CIMObjectNotFoundException indicates that a requested object was not
164 found. This exception corresponds to the CIM_ERR_NOT_FOUND status code.
|
165 kumpf 1.13 */
|
166 kumpf 1.17 class PEGASUS_PROVIDER_LINKAGE CIMObjectNotFoundException
167 : public CIMOperationFailedException
|
168 mike 1.2 {
169 public:
|
170 kumpf 1.29 /**
171 Constructs a CIMObjectNotFoundException with a specified error message.
172 @param message A message String containing an error description
173 */
|
174 kumpf 1.28 CIMObjectNotFoundException(const String& message);
175
|
176 kumpf 1.27 #ifdef PEGASUS_INTERNALONLY
|
177 kumpf 1.28 CIMObjectNotFoundException(const MessageLoaderParms& parms);
178 #endif
|
179 mike 1.2 };
180
|
181 kumpf 1.13 /**
|
182 kumpf 1.29 A CIMNotSupportedException indicates that a requested operation is not
183 supported. This exception corresponds to the CIM_ERR_NOT_SUPPORTED status
184 code.
|
185 kumpf 1.13 */
|
186 kumpf 1.17 class PEGASUS_PROVIDER_LINKAGE CIMNotSupportedException
187 : public CIMOperationFailedException
|
188 mike 1.2 {
189 public:
|
190 kumpf 1.29 /**
191 Constructs a CIMNotSupportedException with a specified error message.
192 @param message A message String containing an error description
193 */
|
194 kumpf 1.28 CIMNotSupportedException(const String& message);
195
|
196 kumpf 1.27 #ifdef PEGASUS_INTERNALONLY
|
197 kumpf 1.28 CIMNotSupportedException(const MessageLoaderParms& parms);
198 #endif
|
199 mike 1.2 };
200
|
201 kumpf 1.13 /**
|
202 kumpf 1.29 A CIMObjectAlreadyExistsException indicates that an operation could not be
203 completed because a specified object already exists. This exception
204 corresponds to the CIM_ERR_ALREADY_EXISTS status code.
|
205 kumpf 1.13 */
|
206 kumpf 1.17 class PEGASUS_PROVIDER_LINKAGE CIMObjectAlreadyExistsException
207 : public CIMOperationFailedException
|
208 mike 1.2 {
209 public:
|
210 kumpf 1.29 /**
211 Constructs a CIMObjectAlreadyExistsException with a specified error
212 message.
213 @param message A message String containing an error description
214 */
|
215 kumpf 1.28 CIMObjectAlreadyExistsException(const String& message);
216
|
217 kumpf 1.27 #ifdef PEGASUS_INTERNALONLY
|
218 kumpf 1.28 CIMObjectAlreadyExistsException(const MessageLoaderParms& parms);
219 #endif
|
220 mike 1.2 };
221
|
222 kumpf 1.13 /**
|
223 kumpf 1.29 A CIMPropertyNotFoundException indicates that a property was specified
224 which does not exist. This exception corresponds to the
225 CIM_ERR_NO_SUCH_PROPERTY status code.
|
226 kumpf 1.13 */
|
227 kumpf 1.17 class PEGASUS_PROVIDER_LINKAGE CIMPropertyNotFoundException
228 : public CIMOperationFailedException
|
229 mike 1.2 {
230 public:
|
231 kumpf 1.29 /**
232 Constructs a CIMPropertyNotFoundException with a specified error
233 message.
234 @param message A message String containing an error description
235 */
|
236 kumpf 1.28 CIMPropertyNotFoundException(const String& message);
237
|
238 kumpf 1.27 #ifdef PEGASUS_INTERNALONLY
|
239 kumpf 1.28 CIMPropertyNotFoundException(const MessageLoaderParms& parms);
240 #endif
|
241 mike 1.2 };
242
|
243 kumpf 1.16 #if 0
244 // Query operations are not yet supported in Pegasus
|
245 kumpf 1.13 /**
|
246 kumpf 1.29 A CIMInvalidQueryException indicates that a query is not valid for a
247 specified query language. This exception corresponds to the
248 CIM_ERR_INVALID_QUERY status code.
|
249 kumpf 1.13 */
|
250 kumpf 1.17 class PEGASUS_PROVIDER_LINKAGE CIMInvalidQueryException
251 : public CIMOperationFailedException
|
252 mike 1.2 {
253 public:
|
254 kumpf 1.29 /**
255 Constructs a CIMInvalidQueryException with a specified error message.
256 @param message A message String containing an error description
257 */
|
258 kumpf 1.28 CIMInvalidQueryException(const String& message);
259
|
260 kumpf 1.27 #ifdef PEGASUS_INTERNALONLY
|
261 kumpf 1.28 CIMInvalidQueryException(const MessageLoaderParms& parms);
|
262 chuck 1.21 #endif
|
263 mike 1.2 };
|
264 kumpf 1.16 #endif
|
265 mike 1.2
|
266 kumpf 1.13 /**
|
267 kumpf 1.29 A CIMMethodNotFoundException indicates that a specified extrinsic method
268 does not exist. This exception corresponds to the CIM_ERR_METHOD_NOT_FOUND
269 status code.
|
270 kumpf 1.13 */
|
271 kumpf 1.17 class PEGASUS_PROVIDER_LINKAGE CIMMethodNotFoundException
272 : public CIMOperationFailedException
|
273 mike 1.2 {
274 public:
|
275 kumpf 1.29 /**
276 Constructs a CIMMethodNotFoundException with a specified error message.
277 @param message A message String containing an error description
278 */
|
279 kumpf 1.28 CIMMethodNotFoundException(const String& message);
280
|
281 kumpf 1.27 #ifdef PEGASUS_INTERNALONLY
|
282 kumpf 1.28 CIMMethodNotFoundException(const MessageLoaderParms& parms);
|
283 chuck 1.21 #endif
|
284 mike 1.2 };
285
286 PEGASUS_NAMESPACE_END
287
288 #endif
|