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

Diff for /pegasus/src/Pegasus/Common/InternalException.h between version 1.3 and 1.28.4.1

version 1.3, 2002/08/21 00:15:44 version 1.28.4.1, 2009/03/16 08:57:14
Line 1 
Line 1 
 //%/////////////////////////////////////////////////////////////////////////////  //%2006////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,  // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
 // The Open Group, Tivoli Systems  // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
   // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
   // IBM Corp.; EMC Corporation, The Open Group.
   // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
   // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
   // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
   // EMC Corporation; VERITAS Software Corporation; The Open Group.
   // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
   // EMC Corporation; Symantec Corporation; The Open Group.
 // //
 // Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to // of this software and associated documentation files (the "Software"), to
Line 21 
Line 29 
 // //
 //============================================================================== //==============================================================================
 // //
 // Author: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)  
 //  
 // Modified By:  
 //  
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #ifndef Pegasus_InternalException_h #ifndef Pegasus_InternalException_h
Line 33 
Line 37 
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
 #include <Pegasus/Common/Linkage.h> #include <Pegasus/Common/Linkage.h>
 #include <Pegasus/Common/Exception.h> #include <Pegasus/Common/Exception.h>
   #include <Pegasus/Common/PegasusAssert.h>
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
Line 49 
Line 54 
         const char* file,         const char* file,
         size_t line,         size_t line,
         const String& message);         const String& message);
 };  
  
 /** define PEGASUS_ASSERT assertion statement.  This statement tests the      virtual ~AssertionFailureException();
     condition defined by the parameters and if not True executes an  };
  
     <pre>  
     throw AssertionFailureException  
     </pre>  
   
     defining the file, line and condition that was tested.  
 */  
 #ifdef NDEBUG  
 #define PEGASUS_ASSERT(COND)  
 #else  
 #define PEGASUS_ASSERT(COND) \  
     do \  
     { \  
         if (!(COND)) \  
         { \  
             throw AssertionFailureException(__FILE__, __LINE__, #COND); \  
         } \  
     } while (0)  
 #endif  
  
 /* Macro to Create the equivalent of an assert but without the /* Macro to Create the equivalent of an assert but without the
    termination.  This can be used as a temporary marker for asserts    termination.  This can be used as a temporary marker for asserts
Line 99 
Line 85 
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
   
       NullPointer();
  
     NullPointer() : Exception(MSG) { }      virtual ~NullPointer();
 }; };
  
 // ATTN: P3  KS documentation Required // ATTN: P3  KS documentation Required
Line 109 
Line 98 
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
  
     UndeclaredQualifier(const String& qualifierName)      UndeclaredQualifier(const String& qualifierName) ;
         : Exception(MSG + qualifierName) { }  
       virtual ~UndeclaredQualifier();
 }; };
  
 // ATTN: P3  KS documentation Required // ATTN: P3  KS documentation Required
Line 120 
Line 111 
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
   
       BadQualifierScope(
           const String& qualifierName,
           const String& scopeString);
  
     BadQualifierScope(const String& qualifierName, const String& scopeString)      virtual ~BadQualifierScope();
         : Exception(MSG + qualifierName + String(" scope=") + scopeString) { }  
 }; };
  
 // ATTN: P3  KS documentation Required // ATTN: P3  KS documentation Required
Line 131 
Line 126 
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
  
     BadQualifierOverride(const String& qualifierName)      BadQualifierOverride(const String& qualifierName);
         : Exception(MSG + qualifierName) { }  
       virtual ~BadQualifierOverride();
 }; };
  
 class PEGASUS_COMMON_LINKAGE BadQualifierType : public Exception class PEGASUS_COMMON_LINKAGE BadQualifierType : public Exception
Line 141 
Line 138 
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
  
     BadQualifierType(const String& qualifierName)      BadQualifierType(const String& qualifierName);
         : Exception(MSG + qualifierName) { }      virtual ~BadQualifierType();
 }; };
  
 // ATTN: P3  KS documentation Required // ATTN: P3  KS documentation Required
 class PEGASUS_COMMON_LINKAGE ClassAlreadyResolved : public Exception  class PEGASUS_COMMON_LINKAGE InstantiatedAbstractClass : public Exception
 { {
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
  
     ClassAlreadyResolved(const String& className)      InstantiatedAbstractClass(const String& className);
         : Exception(MSG + className) { }      virtual ~InstantiatedAbstractClass();
 }; };
  
 // ATTN: P3  KS documentation Required // ATTN: P3  KS documentation Required
 class PEGASUS_COMMON_LINKAGE ClassNotResolved : public Exception  class PEGASUS_COMMON_LINKAGE NoSuchProperty : public Exception
 { {
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
  
     ClassNotResolved(const String& className)      NoSuchProperty(const String& propertyName);
         : Exception(MSG + className) { }      virtual ~NoSuchProperty();
 }; };
  
 // ATTN: P3  KS documentation Required // ATTN: P3  KS documentation Required
 class PEGASUS_COMMON_LINKAGE InstanceAlreadyResolved : public Exception  class PEGASUS_COMMON_LINKAGE NoSuchFile : public Exception
 { {
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
  
     InstanceAlreadyResolved()      NoSuchFile(const String& fileName);
      : Exception(MSG) { }      virtual ~NoSuchFile();
 }; };
  
 // ATTN: P3  KS documentation Required // ATTN: P3  KS documentation Required
 class PEGASUS_COMMON_LINKAGE InstantiatedAbstractClass : public Exception  class PEGASUS_COMMON_LINKAGE FileNotReadable : public Exception
 { {
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
  
     InstantiatedAbstractClass(const String& className)      FileNotReadable(const String& fileName);
      : Exception(MSG + className) { }      virtual ~FileNotReadable();
 }; };
  
 // ATTN: P3  KS documentation Required // ATTN: P3  KS documentation Required
 class PEGASUS_COMMON_LINKAGE NoSuchProperty : public Exception  class PEGASUS_COMMON_LINKAGE CannotRemoveDirectory : public Exception
 { {
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
  
     NoSuchProperty(const String& propertyName)      CannotRemoveDirectory(const String& path);
         : Exception(MSG + propertyName) { }      virtual ~CannotRemoveDirectory();
 }; };
  
 // ATTN: P3  KS documentation Required // ATTN: P3  KS documentation Required
 class PEGASUS_COMMON_LINKAGE NoSuchFile : public Exception  class PEGASUS_COMMON_LINKAGE CannotRemoveFile : public Exception
 { {
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
  
     NoSuchFile(const String& fileName) : Exception(MSG + fileName) { }      CannotRemoveFile(const String& path);
       virtual ~CannotRemoveFile();
 }; };
  
 // ATTN: P3  KS documentation Required // ATTN: P3  KS documentation Required
 class PEGASUS_COMMON_LINKAGE FileNotReadable : public Exception  class PEGASUS_COMMON_LINKAGE CannotRenameFile : public Exception
 { {
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
  
     FileNotReadable(const String& fileName) : Exception(MSG + fileName) { }      CannotRenameFile(const String& path);
       virtual ~CannotRenameFile();
 }; };
  
 // ATTN: P3  KS documentation Required // ATTN: P3  KS documentation Required
 class PEGASUS_COMMON_LINKAGE CannotRemoveDirectory : public Exception  class PEGASUS_COMMON_LINKAGE NoSuchDirectory : public Exception
 { {
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
  
     CannotRemoveDirectory(const String& path) : Exception(MSG + path) { }      NoSuchDirectory(const String& directoryName);
       virtual ~NoSuchDirectory();
 }; };
  
 // ATTN: P3  KS documentation Required // ATTN: P3  KS documentation Required
 class PEGASUS_COMMON_LINKAGE CannotRemoveFile : public Exception  class PEGASUS_COMMON_LINKAGE CannotCreateDirectory : public Exception
 { {
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
  
     CannotRemoveFile(const String& path) : Exception(MSG + path) { }      CannotCreateDirectory(const String& path);
       virtual ~CannotCreateDirectory();
 }; };
  
 // ATTN: P3  KS documentation Required // ATTN: P3  KS documentation Required
 class PEGASUS_COMMON_LINKAGE CannotRenameFile : public Exception  class PEGASUS_COMMON_LINKAGE CannotOpenFile : public Exception
 { {
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
  
     CannotRenameFile(const String& path) : Exception(MSG + path) { }      CannotOpenFile(const String& path);
       virtual ~CannotOpenFile();
 }; };
  
 // ATTN: P3  KS documentation Required // ATTN: P3  KS documentation Required
 class PEGASUS_COMMON_LINKAGE NoSuchDirectory : public Exception  class PEGASUS_COMMON_LINKAGE CannotChangeFilePerm : public Exception
 { {
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
  
     NoSuchDirectory(const String& directoryName)      CannotChangeFilePerm(const String& path);
         : Exception(MSG + directoryName) { }      virtual ~CannotChangeFilePerm();
 }; };
  
 // ATTN: P3  KS documentation Required // ATTN: P3  KS documentation Required
 class PEGASUS_COMMON_LINKAGE CannotCreateDirectory : public Exception  class PEGASUS_COMMON_LINKAGE NotImplemented : public Exception
 { {
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
  
     CannotCreateDirectory(const String& path)      NotImplemented(const String& method);
         : Exception(MSG + path) { }      virtual ~NotImplemented();
 }; };
  
 // ATTN: P3  KS documentation Required  class PEGASUS_COMMON_LINKAGE StackUnderflow : public Exception
 class PEGASUS_COMMON_LINKAGE CannotOpenFile : public Exception  
 { {
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
  
     CannotOpenFile(const String& path)      StackUnderflow();
         : Exception(MSG + path) { }      virtual ~StackUnderflow();
 }; };
  
 // ATTN: P3  KS documentation Required  class PEGASUS_COMMON_LINKAGE StackOverflow : public Exception
 class PEGASUS_COMMON_LINKAGE NotImplemented : public Exception  
 { {
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
  
     NotImplemented(const String& method) : Exception(MSG + method) { }      StackOverflow();
       virtual ~StackOverflow();
 }; };
  
 class PEGASUS_COMMON_LINKAGE StackUnderflow : public Exception  class PEGASUS_COMMON_LINKAGE DynamicLoadFailed : public Exception
 { {
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
  
     StackUnderflow() : Exception(MSG) { }      DynamicLoadFailed(const String& libraryName);
       virtual ~DynamicLoadFailed();
 }; };
  
 class PEGASUS_COMMON_LINKAGE StackOverflow : public Exception  class PEGASUS_COMMON_LINKAGE DynamicLookupFailed : public Exception
 { {
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
  
     StackOverflow() : Exception(MSG) { }      DynamicLookupFailed(const String& symbolName);
       virtual ~DynamicLookupFailed();
 }; };
  
 class PEGASUS_COMMON_LINKAGE QueueUnderflow : public Exception  class PEGASUS_COMMON_LINKAGE CannotOpenDirectory : public Exception
 { {
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
  
     QueueUnderflow() : Exception(MSG) { }      CannotOpenDirectory(const String& path);
       virtual ~CannotOpenDirectory();
 }; };
  
 class PEGASUS_COMMON_LINKAGE BadFormat : public Exception  class PEGASUS_COMMON_LINKAGE ParseError : public Exception
 { {
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
  
     BadFormat() : Exception(MSG) { }      ParseError(const String& message);
       virtual ~ParseError();
 }; };
  
 class PEGASUS_COMMON_LINKAGE BadlyFormedCGIQueryString : public Exception  class PEGASUS_COMMON_LINKAGE MissingNullTerminator : public Exception
 { {
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
  
     BadlyFormedCGIQueryString() : Exception(MSG) { }      MissingNullTerminator();
       virtual ~MissingNullTerminator();
 }; };
  
 class PEGASUS_COMMON_LINKAGE DynamicLoadFailed : public Exception  class PEGASUS_COMMON_LINKAGE MalformedLanguageHeader: public Exception
 { {
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
  
     DynamicLoadFailed(const String& libraryName)      MalformedLanguageHeader(const String& error);
         : Exception(MSG + libraryName) { }      virtual ~MalformedLanguageHeader();
 }; };
  
 class PEGASUS_COMMON_LINKAGE DynamicLookupFailed : public Exception  class PEGASUS_COMMON_LINKAGE InvalidAcceptLanguageHeader: public Exception
 { {
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
  
     DynamicLookupFailed(const String& symbolName)      InvalidAcceptLanguageHeader(const String& error);
         : Exception(MSG + symbolName) { }      virtual ~InvalidAcceptLanguageHeader();
 }; };
  
 class PEGASUS_COMMON_LINKAGE CannotOpenDirectory : public Exception  class PEGASUS_COMMON_LINKAGE InvalidContentLanguageHeader: public Exception
 { {
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
  
     CannotOpenDirectory(const String& path) : Exception(MSG + path) { }      InvalidContentLanguageHeader(const String& error);
       virtual ~InvalidContentLanguageHeader();
 }; };
  
 class PEGASUS_COMMON_LINKAGE ParseError : public Exception  class PEGASUS_COMMON_LINKAGE InvalidAuthHeader: public Exception
 { {
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
  
     ParseError(const String& message) : Exception(MSG + message) { }      InvalidAuthHeader();
       virtual ~InvalidAuthHeader();
 }; };
  
 class PEGASUS_COMMON_LINKAGE MissingNullTerminator : public Exception  class PEGASUS_COMMON_LINKAGE UnauthorizedAccess: public Exception
 { {
 public: public:
  
     static const char MSG[];     static const char MSG[];
       static const char KEY[];
  
     MissingNullTerminator() : Exception(MSG) { }      UnauthorizedAccess();
       virtual ~UnauthorizedAccess();
 }; };
  
 class PEGASUS_COMMON_LINKAGE InvalidAuthHeader: public Exception  class PEGASUS_COMMON_LINKAGE IncompatibleTypesException : public Exception
 { {
 public: public:
       IncompatibleTypesException();
     static const char MSG[];      virtual ~IncompatibleTypesException();
   
     InvalidAuthHeader() : Exception(MSG) { }  
 }; };
  
 class PEGASUS_COMMON_LINKAGE UnauthorizedAccess: public Exception  class PEGASUS_COMMON_LINKAGE InternalSystemError : public Exception
 { {
 public: public:
  
     static const char MSG[];     static const char MSG[];
  
     UnauthorizedAccess() : Exception(MSG) { }      InternalSystemError();
       virtual ~InternalSystemError();
 }; };
  
   
 /** The CIMException defines the CIM exceptions that are formally defined in /** The CIMException defines the CIM exceptions that are formally defined in
     the CIM Operations over HTTP specification.  TraceableCIMException allows     the CIM Operations over HTTP specification.  TraceableCIMException allows
     file name and line number information to be added for diagnostic purposes.     file name and line number information to be added for diagnostic purposes.
Line 415 
Line 449 
     TraceableCIMException(     TraceableCIMException(
         CIMStatusCode code,         CIMStatusCode code,
         const String& message,         const String& message,
         const char* file,          const String& file,
           Uint32 line);
   
       TraceableCIMException(
           CIMStatusCode code,
           const MessageLoaderParms& parms,
           const String& file,
           Uint32 line);
   
       TraceableCIMException(
           const ContentLanguageList& langs,
           CIMStatusCode code,
           const String& message,
           const String& file,
         Uint32 line);         Uint32 line);
  
     TraceableCIMException(const CIMException & cimException);     TraceableCIMException(const CIMException & cimException);
Line 423 
Line 470 
     String getDescription() const;     String getDescription() const;
  
     String getTraceDescription() const;     String getTraceDescription() const;
   
       String getCIMMessage() const;
       void setCIMMessage(const String& cimMessage);
   
       String getFile() const;
       Uint32 getLine() const;
       const ContentLanguageList& getContentLanguages() const;
 }; };
  
 #define PEGASUS_CIM_EXCEPTION(CODE, EXTRA_MESSAGE) \ #define PEGASUS_CIM_EXCEPTION(CODE, EXTRA_MESSAGE) \
     TraceableCIMException(CODE, EXTRA_MESSAGE, __FILE__, __LINE__)      TraceableCIMException(CODE, EXTRA_MESSAGE, String(__FILE__), __LINE__)
   
   #define PEGASUS_CIM_EXCEPTION_LANG(LANGS, CODE, EXTRA_MESSAGE) \
       TraceableCIMException( \
           LANGS, CODE, EXTRA_MESSAGE, String(__FILE__), __LINE__)
   
   #define PEGASUS_CIM_EXCEPTION_L(CODE, MSG_PARMS) \
       TraceableCIMException(CODE, MSG_PARMS, String(__FILE__), __LINE__)
   
   /** Macro to prevent overflow of a signed int value when said value is
    *  doubled. If String/Array/Buffer size is greater than 0x3FFFFFFF, then
    *  something is suspect, throw bad_alloc exception.
    */
   #define PEGASUS_CHECK_CAPACITY_OVERFLOW(capacity) \
       do \
       { \
           if (capacity > 0x3FFFFFFF) \
               throw PEGASUS_STD(bad_alloc)(); \
       } \
       while (0)
   
   /** The following function CheckRep serves to reduce the function call
    *  overhead caused by calling a non-inlined function that only checks
    *  if a pointer is not NULL.
    *  The function ThrowUnitializedObjectException throws
    *  an UninitialisedObjectException.
    *  A function to throw the exception is used to reduce object size of
    *  function CheckRep which is inlined in many places across
    *  the common library.
    */
   PEGASUS_COMMON_LINKAGE extern void ThrowUninitializedObjectException();
   
   inline void CheckRep(void * rep)
   {
       if (!rep)
           ThrowUninitializedObjectException();
   }
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END
  


Legend:
Removed from v.1.3  
changed lines
  Added in v.1.28.4.1

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2