(file) Return to Exception.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2