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

Diff for /pegasus/src/Pegasus/Common/Exception.cpp between version 1.8 and 1.14

version 1.8, 2001/03/05 04:29:01 version 1.14, 2001/05/24 00:48:36
Line 1 
Line 1 
 //BEGIN_LICENSE  //%/////////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM // Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM
 // //
Line 17 
Line 17 
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE. // DEALINGS IN THE SOFTWARE.
 // //
 //END_LICENSE  //==============================================================================
 //BEGIN_HISTORY  
 // //
 // Author:  // Author: Mike Brasher (mbrasher@bmc.com)
 // //
 // $Log$  // Modified By:
 // Revision 1.8  2001/03/05 04:29:01  mike  
 // renamed CimException to CIMException  
 // //
 // Revision 1.7  2001/02/16 02:06:06  mike  //%/////////////////////////////////////////////////////////////////////////////
 // Renamed many classes and headers.  
 //  
 // Revision 1.6  2001/02/11 05:42:33  mike  
 // new  
 //  
 // Revision 1.5  2001/01/29 02:23:44  mike  
 // Added support for GetInstance operation  
 //  
 // Revision 1.4  2001/01/28 04:11:03  mike  
 // fixed qualifier resolution  
 //  
 // Revision 1.3  2001/01/23 01:25:35  mike  
 // Reworked resolve scheme.  
 //  
 // Revision 1.2  2001/01/22 00:45:47  mike  
 // more work on resolve scheme  
 //  
 // Revision 1.1.1.1  2001/01/14 19:51:33  mike  
 // Pegasus import  
 //  
 //  
 //END_HISTORY  
  
 #include <cstdio> #include <cstdio>
 #include "Exception.h" #include "Exception.h"
Line 95 
Line 70 
  
 const char IllegalName::MSG[] = "illegal CIM name"; const char IllegalName::MSG[] = "illegal CIM name";
  
 const char NoSuchSuperClass::MSG[] = "no such super class: ";  
   
 const char NoSuchClass::MSG[] = "no such class: ";  
   
 const char InvalidPropertyOverride::MSG[] = "invalid property override: "; const char InvalidPropertyOverride::MSG[] = "invalid property override: ";
  
 const char InvalidMethodOverride::MSG[] = "invalid method override: "; const char InvalidMethodOverride::MSG[] = "invalid method override: ";
Line 172 
Line 143 
  
 const char BadlyFormedCGIQueryString::MSG[] = "badly formed CGI query string"; const char BadlyFormedCGIQueryString::MSG[] = "badly formed CGI query string";
  
 const char BadInstanceName::MSG[] = "bad instance name: ";  const char IllformedObjectName::MSG[] = "illformed object name: ";
  
 const char DynamicLoadFailed::MSG[] = "load of dynamic library failed: "; const char DynamicLoadFailed::MSG[] = "load of dynamic library failed: ";
  
Line 187 
Line 158 
 // //
 //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
  
 static char* _cimMessages[] =  static const char* _cimMessages[] =
 { {
     "successful",      "SUCCESS: successful",
  
     "A general error occurred that is not covered by a more specific "      "FAILED: A general error occurred that is not covered by a more specific "
     "error code.",      "error code",
  
     "Access to a CIM resource was not available to the client.",      "ACCESS_DENIED: Access to a CIM resource was not available to the client",
  
     "The target namespace does not exist.",      "INVALID_NAMESPACE: The target namespace does not exist",
  
     "One or more parameter values passed to the method were invalid.",      "INVALID_PARAMETER: One or more parameter values passed to the method "
       "were invalid",
  
     "The specified class does not exist.",      "INVALID_CLASS: The specified class does not exist",
  
     "The requested object could not be found.",      "NOT_FOUND: The requested object could not be found",
  
     "The requested operation is not supported.",      "NOT_SUPPORTED: The requested operation is not supported",
  
     "Operation cannot be carried out on this class since it has subclasses.",      "CLASS_HAS_CHILDREN: Operation cannot be carried out on this class since "
       "it has subclasses",
  
     "Operation cannot be carried out on this class since it has instances.",      "CLASS_HAS_INSTANCES: Operation cannot be carried out on this class since "
       "it has instances",
  
     "Operation cannot be carried out since the specified "      "INVALID_SUPERCLASS: Operation cannot be carried out since the specified "
     "superClass does not exist.",      "superclass does not exist",
  
     "Operation cannot be carried out because an object already exists.",      "ALREADY_EXISTS: Operation cannot be carried out because an object already "
       "exists",
  
     "The specified property does not exist.",      "NO_SUCH_PROPERTY: The specified property does not exist",
  
     "The value supplied is incompatible with the type.",      "TYPE_MISMATCH: The value supplied is incompatible with the type",
  
     "The query language is not recognized or supported.",      "QUERY_LANGUAGE_NOT_SUPPORTED: The query language is not recognized or "
       "supported",
  
     "The query is not valid for the specified query language.",      "INVALID_QUERY: The query is not valid for the specified query language",
  
     "The extrinsic method could not be executed.",      "METHOD_NOT_AVAILABLE: The extrinsic method could not be executed",
  
     "The specified extrinsic method does not exist."      "METHOD_NOT_FOUND: The specified extrinsic method does not exist"
 }; };
  
 static String _makeCIMExceptionMessage( static String _makeCIMExceptionMessage(
     CIMException::Code code,     CIMException::Code code,
       const char* file,
       Uint32 line,
     const String& extraMessage)     const String& extraMessage)
 { {
     String tmp = _cimMessages[Uint32(code)];      String tmp = file;
     tmp.append(": ");      tmp.append("(");
       char buffer[32];
       sprintf(buffer, "%d", line);
       tmp.append(buffer);
       tmp.append("): ");
   
       tmp.append(_cimMessages[Uint32(code)]);
       tmp.append(": \"");
     tmp.append(extraMessage);     tmp.append(extraMessage);
       tmp.append("\"");
     return tmp;     return tmp;
 } }
  
 CIMException::CIMException( CIMException::CIMException(
     CIMException::Code code,     CIMException::Code code,
       const char* file,
       Uint32 line,
     const String& extraMessage)     const String& extraMessage)
     : Exception(_makeCIMExceptionMessage(code, extraMessage)), _code(code)      : Exception(_makeCIMExceptionMessage(code, file, line, extraMessage)),
       _code(code)
 { {
  
 } }
Line 251 
Line 240 
     return _cimMessages[Uint32(code)];     return _cimMessages[Uint32(code)];
 } }
  
   void ThrowUnitializedHandle()
   {
       throw UnitializedHandle();
   }
   
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


Legend:
Removed from v.1.8  
changed lines
  Added in v.1.14

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2