/home/builduser/trunk/pkgs/tog-pegasus/BUILD/pegasus/src/Pegasus/Provider/ProviderException.h
00001 //%LICENSE//////////////////////////////////////////////////////////////// 00002 // 00003 // Licensed to The Open Group (TOG) under one or more contributor license 00004 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with 00005 // this work for additional information regarding copyright ownership. 00006 // Each contributor licenses this file to you under the OpenPegasus Open 00007 // Source License; you may not use this file except in compliance with the 00008 // License. 00009 // 00010 // Permission is hereby granted, free of charge, to any person obtaining a 00011 // copy of this software and associated documentation files (the "Software"), 00012 // to deal in the Software without restriction, including without limitation 00013 // the rights to use, copy, modify, merge, publish, distribute, sublicense, 00014 // and/or sell copies of the Software, and to permit persons to whom the 00015 // Software is furnished to do so, subject to the following conditions: 00016 // 00017 // The above copyright notice and this permission notice shall be included 00018 // in all copies or substantial portions of the Software. 00019 // 00020 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00021 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00022 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 00023 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 00024 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 00025 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 00026 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00027 // 00029 // 00030 //%///////////////////////////////////////////////////////////////////////////// 00031 00032 #ifndef Pegasus_ProviderException_h 00033 #define Pegasus_ProviderException_h 00034 00035 #include <Pegasus/Common/Config.h> 00036 #include <Pegasus/Common/Exception.h> 00037 #include <Pegasus/Provider/Linkage.h> 00038 00039 PEGASUS_NAMESPACE_BEGIN 00040 00061 class PEGASUS_PROVIDER_LINKAGE CIMOperationFailedException 00062 : public CIMException 00063 { 00064 public: 00071 CIMOperationFailedException(const String& message); 00072 00073 #ifdef PEGASUS_INTERNALONLY 00074 /* 00075 <p>This exception will cause a <tt>CIM_ERR_FAILED</tt> 00076 status code to be returned to the client.</p> 00077 */ 00078 CIMOperationFailedException(const MessageLoaderParms& parms); 00079 #endif 00080 00081 protected: 00089 CIMOperationFailedException( 00090 const CIMStatusCode code, 00091 const String& message); 00092 00093 #ifdef PEGASUS_INTERNALONLY 00094 CIMOperationFailedException( 00095 const CIMStatusCode code, 00096 const MessageLoaderParms& parms); 00097 #endif 00098 }; 00099 00104 class PEGASUS_PROVIDER_LINKAGE CIMAccessDeniedException 00105 : public CIMOperationFailedException 00106 { 00107 public: 00112 CIMAccessDeniedException(const String& message); 00113 00114 #ifdef PEGASUS_INTERNALONLY 00115 CIMAccessDeniedException(const MessageLoaderParms& parms); 00116 #endif 00117 }; 00118 00124 class PEGASUS_PROVIDER_LINKAGE CIMInvalidParameterException 00125 : public CIMOperationFailedException 00126 { 00127 public: 00133 CIMInvalidParameterException(const String& message); 00134 00135 #ifdef PEGASUS_INTERNALONLY 00136 CIMInvalidParameterException(const MessageLoaderParms& parms); 00137 #endif 00138 }; 00139 00140 #if 0 00141 00146 class PEGASUS_PROVIDER_LINKAGE CIMInvalidClassException 00147 : public CIMOperationFailedException 00148 { 00149 public: 00154 CIMInvalidClassException(const String& message); 00155 00156 #ifdef PEGASUS_INTERNALONLY 00157 CIMInvalidClassException(const MessageLoaderParms& parms); 00158 #endif 00159 }; 00160 #endif 00161 00166 class PEGASUS_PROVIDER_LINKAGE CIMObjectNotFoundException 00167 : public CIMOperationFailedException 00168 { 00169 public: 00174 CIMObjectNotFoundException(const String& message); 00175 00176 #ifdef PEGASUS_INTERNALONLY 00177 CIMObjectNotFoundException(const MessageLoaderParms& parms); 00178 #endif 00179 }; 00180 00186 class PEGASUS_PROVIDER_LINKAGE CIMNotSupportedException 00187 : public CIMOperationFailedException 00188 { 00189 public: 00194 CIMNotSupportedException(const String& message); 00195 00196 #ifdef PEGASUS_INTERNALONLY 00197 CIMNotSupportedException(const MessageLoaderParms& parms); 00198 #endif 00199 }; 00200 00206 class PEGASUS_PROVIDER_LINKAGE CIMObjectAlreadyExistsException 00207 : public CIMOperationFailedException 00208 { 00209 public: 00215 CIMObjectAlreadyExistsException(const String& message); 00216 00217 #ifdef PEGASUS_INTERNALONLY 00218 CIMObjectAlreadyExistsException(const MessageLoaderParms& parms); 00219 #endif 00220 }; 00221 00227 class PEGASUS_PROVIDER_LINKAGE CIMPropertyNotFoundException 00228 : public CIMOperationFailedException 00229 { 00230 public: 00236 CIMPropertyNotFoundException(const String& message); 00237 00238 #ifdef PEGASUS_INTERNALONLY 00239 CIMPropertyNotFoundException(const MessageLoaderParms& parms); 00240 #endif 00241 }; 00242 00243 #if 0 00244 // Query operations are not yet supported in Pegasus 00250 class PEGASUS_PROVIDER_LINKAGE CIMInvalidQueryException 00251 : public CIMOperationFailedException 00252 { 00253 public: 00258 CIMInvalidQueryException(const String& message); 00259 00260 #ifdef PEGASUS_INTERNALONLY 00261 CIMInvalidQueryException(const MessageLoaderParms& parms); 00262 #endif 00263 }; 00264 #endif 00265 00271 class PEGASUS_PROVIDER_LINKAGE CIMMethodNotFoundException 00272 : public CIMOperationFailedException 00273 { 00274 public: 00279 CIMMethodNotFoundException(const String& message); 00280 00281 #ifdef PEGASUS_INTERNALONLY 00282 CIMMethodNotFoundException(const MessageLoaderParms& parms); 00283 #endif 00284 }; 00285 00286 PEGASUS_NAMESPACE_END 00287 00288 #endif