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

Diff for /pegasus/src/Pegasus/Common/InternalException.cpp between version 1.7 and 1.17

version 1.7, 2003/07/15 16:53:03 version 1.17, 2005/02/05 22:59:23
Line 1 
Line 1 
 //%/////////////////////////////////////////////////////////////////////////////  //%2005////////////////////////////////////////////////////////////////////////
 // //
 // 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.
 // //
 // 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 53 
Line 59 
     _rep->message.append("): ");     _rep->message.append("): ");
     _rep->message.append(message);     _rep->message.append(message);
  
     // ATTN-RK-P3-20020408: Should define a "test" trace component      PEG_TRACE_STRING(TRC_DISCARDED_DATA, Tracer::LEVEL2, _rep->message);
     PEG_TRACE_STRING(TRC_SERVER, Tracer::LEVEL2, _rep->message);  
 } }
  
 const char NullPointer::MSG[] = "null pointer"; const char NullPointer::MSG[] = "null pointer";
   const char NullPointer::KEY[] = "Common.InternalException.NULL_POINTER";
  
 const char UndeclaredQualifier::MSG[] = "undeclared qualifier: ";  //l10n
   const char UndeclaredQualifier::MSG[] = "undeclared qualifier: $0";
   const char UndeclaredQualifier::KEY[] = "Common.InternalException.UNDECLARED_QUALIFIER";
  
 const char BadQualifierScope::MSG[] = "qualifier invalid in this scope: ";  //l10n
   const char BadQualifierScope::MSG[] = "qualifier invalid in this scope: $0 scope=$1";
   const char BadQualifierScope::KEY[] = "Common.InternalException.BAD_QUALIFIER_SCOPE";
  
 const char BadQualifierOverride::MSG[] = "qualifier not overridable: ";  //l10n
   const char BadQualifierOverride::MSG[] = "qualifier not overridable: $0";
   const char BadQualifierOverride::KEY[] = "Common.InternalException.BAD_QUALIFIER_OVERRIDE";
  
 const char BadQualifierType::MSG[] =  //l10n
     "CIMType of qualifier different than its declaration: ";  const char BadQualifierType::MSG[] = "CIMType of qualifier different than its declaration: $0";
   const char BadQualifierType::KEY[] = "Common.InternalException.BAD_QUALIFIER_TYPE";
  
 const char ClassAlreadyResolved::MSG[] =  const char ClassAlreadyResolved::MSG[] = "attempt to resolve a class that is already resolved: $0";
     "attempt to resolve a class that is already resolved: ";  const char ClassAlreadyResolved::KEY[] = "Common.InternalException.CLASS_ALREADY_RESOLVED";
  
 const char ClassNotResolved::MSG[] =  //l10n
     "class is not yet resolved: ";  const char ClassNotResolved::MSG[] = "class is not yet resolved: $0";
   const char ClassNotResolved::KEY[] = "Common.InternalException.CLASS_NOT_RESOLVED";
  
 const char InstanceAlreadyResolved::MSG[] =  const char InstanceAlreadyResolved::MSG[] = "attempted to resolve a instance that is already resolved";
     "attempted to resolve a instance that is already resolved";  const char InstanceAlreadyResolved::KEY[] = "Common.InternalException.INSTANCE_ALREADY_RESOLVED";
  
 const char InstantiatedAbstractClass::MSG[] =  //l10n
     "attempted to instantiate an abstract class ";  const char InstantiatedAbstractClass::MSG[] = "attempted to instantiate an abstract class $0";
   const char InstantiatedAbstractClass::KEY[] = "Common.InternalException.INSTANTIATED_ABSTRACT_CLASS";
  
 const char NoSuchProperty::MSG[] = "no such property: ";  //l10n
   const char NoSuchProperty::MSG[] = "no such property: $0";
   const char NoSuchProperty::KEY[] = "Common.InternalException.NO_SUCH_PROPERTY";
  
 const char NoSuchFile::MSG[] = "no such file: ";  //l10n
   const char NoSuchFile::MSG[] = "no such file: $0";
   const char NoSuchFile::KEY[] = "Common.InternalException.NO_SUCH_FILE";
  
 const char FileNotReadable::MSG[] = "file not readable: ";  //l10n
   const char FileNotReadable::MSG[] = "file not readable: $0";
   const char FileNotReadable::KEY[] = "Common.InternalException.FILE_NOT_READABLE";
  
 const char CannotRemoveDirectory::MSG[] = "cannot remove directory: ";  //l10n
   const char CannotRemoveDirectory::MSG[] = "cannot remove directory: $0";
   const char CannotRemoveDirectory::KEY[] = "Common.InternalException.CANNOT_REMOVE_DIRECTORY";
  
 const char CannotRemoveFile::MSG[] = "cannot remove file: ";  //l10n
   const char CannotRemoveFile::MSG[] = "cannot remove file: $0";
   const char CannotRemoveFile::KEY[] = "Common.InternalException.CANNOT_REMOVE_FILE";
  
 const char CannotRenameFile::MSG[] = "cannot rename file: ";  //l10n
   const char CannotRenameFile::MSG[] = "cannot rename file: $0";
   const char CannotRenameFile::KEY[] = "Common.InternalException.CANNOT_RENAME_FILE";
  
 const char NoSuchDirectory::MSG[] = "no such directory: ";  //l10n
   const char NoSuchDirectory::MSG[] = "no such directory: $0";
   const char NoSuchDirectory::KEY[] = "Common.InternalException.NO_SUCH_DIRECTORY";
  
 const char CannotCreateDirectory::MSG[] = "cannot create directory: ";  //l10n
   const char CannotCreateDirectory::MSG[] = "cannot create directory: $0";
   const char CannotCreateDirectory::KEY[] = "Common.InternalException.CANNOT_CREATE_DIRECTORY";
  
 const char CannotOpenFile::MSG[] = "cannot open file: ";  //l10n
   const char CannotOpenFile::MSG[] = "cannot open file: $0";
   const char CannotOpenFile::KEY[] = "Common.InternalException.CANNOT_OPEN_FILE";
  
 const char NotImplemented::MSG[] = "not implemented: ";  //l10n
   const char NotImplemented::MSG[] = "not implemented: $0";
   const char NotImplemented::KEY[] = "Common.InternalException.NOT_IMPLEMENTED";
  
 const char StackUnderflow::MSG[] = "stack underflow"; const char StackUnderflow::MSG[] = "stack underflow";
   const char StackUnderflow::KEY[] = "Common.InternalException.STACK_UNDERFLOW";
  
 const char StackOverflow::MSG[] = "stack overflow"; const char StackOverflow::MSG[] = "stack overflow";
   const char StackOverflow::KEY[] = "Common.InternalException.STACK_OVERFLOW";
  
 const char QueueUnderflow::MSG[] = "queue Underflow"; const char QueueUnderflow::MSG[] = "queue Underflow";
   const char QueueUnderflow::KEY[] = "Common.InternalException.QUEUE UNDERFLOW";
  
 const char BadFormat::MSG[] = "bad format passed to Formatter::format()"; const char BadFormat::MSG[] = "bad format passed to Formatter::format()";
   const char BadFormat::KEY[] = "Common.InternalException.BAD_FORMAT";
  
 const char BadlyFormedCGIQueryString::MSG[] = "badly formed CGI query string"; const char BadlyFormedCGIQueryString::MSG[] = "badly formed CGI query string";
   const char BadlyFormedCGIQueryString::KEY[] = "Common.InternalException.BADLY_FORMED_CGI_QUERY_STRING";
  
 const char DynamicLoadFailed::MSG[] = "load of dynamic library failed: ";  //l10n
   const char DynamicLoadFailed::MSG[] = "load of dynamic library failed: $0";
   const char DynamicLoadFailed::KEY[] = "Common.InternalException.DYNAMIC_LOAD_FAILED";
  
 const char DynamicLookupFailed::MSG[] =  //l10n
     "lookup of symbol in dynamic library failed: ";  const char DynamicLookupFailed::MSG[] = "lookup of symbol in dynamic library failed: $0";
   const char DynamicLookupFailed::KEY[] = "Common.InternalException.DYNAMIC_LOOKUP_FAILED";
  
 const char CannotOpenDirectory::MSG[] = "cannot open directory: ";  //l10n
   const char CannotOpenDirectory::MSG[] = "cannot open directory: $0";
   const char CannotOpenDirectory::KEY[] = "Common.InternalException.CANNOT_OPEN_DIRECTORY";
  
 const char ParseError::MSG[] = "parse error: ";  //l10n
   const char ParseError::MSG[] = "parse error: $0";
   const char ParseError::KEY[] = "Common.InternalException.PARSE_ERROR";
  
 const char MissingNullTerminator::MSG[] = "missing null terminator: ";  //l10n
   const char MissingNullTerminator::MSG[] = "missing null terminator: $0";
   const char MissingNullTerminator::KEY[] = "Common.InternalException.MISSING_NULL_TERMINATOR";
  
 //l10n //l10n
 const char MalformedLanguageHeader::MSG[] = "malformed language header: ";  const char MalformedLanguageHeader::MSG[] = "malformed language header: $0";
   const char MalformedLanguageHeader::KEY[] = "Common.InternalException.MALFORMED_LANGUAGE_HEADER";
  
 const char InvalidAcceptLanguageHeader::MSG[] = "invalid acceptlanguage header: ";  //l10n
   const char InvalidAcceptLanguageHeader::MSG[] = "invalid acceptlanguage header: $0";
   const char InvalidAcceptLanguageHeader::KEY[] = "Common.InternalException.INVALID_ACCEPTLANGUAGE_HEADER";
  
 const char InvalidContentLanguageHeader::MSG[] = "invalid contentlanguage header: ";  
 //l10n //l10n
   const char InvalidContentLanguageHeader::MSG[] = "invalid contentlanguage header: $0";
   const char InvalidContentLanguageHeader::KEY[] = "Common.InternalException.INVALID_CONTENTLANGUAGE_HEADER";
  
 const char InvalidAuthHeader::MSG[] = "Invalid Authorization header"; const char InvalidAuthHeader::MSG[] = "Invalid Authorization header";
   const char InvalidAuthHeader::KEY[] = "Common.InternalException.INVALID_AUTH_HEADER";
  
 const char UnauthorizedAccess::MSG[] = "Unauthorized access"; const char UnauthorizedAccess::MSG[] = "Unauthorized access";
   const char UnauthorizedAccess::KEY[] = "Common.InternalException.UNAUTHORIZED_ACCESS";
   
   const char InternalSystemError::MSG[] = "Unable to authenticate user";
  
 IncompatibleTypesException::IncompatibleTypesException() IncompatibleTypesException::IncompatibleTypesException()
     : Exception("incompatible types")     : Exception("incompatible types")
Line 208 
Line 265 
 static String _makeCIMExceptionDescription( static String _makeCIMExceptionDescription(
     CIMStatusCode code,     CIMStatusCode code,
     const String& message,     const String& message,
     const char* file,      const String& file,
     Uint32 line)     Uint32 line)
 { {
     String tmp = file;     String tmp = file;
Line 221 
Line 278 
     return tmp;     return tmp;
 } }
  
   //l10n
   TraceableCIMException::TraceableCIMException(
       CIMStatusCode code,
       MessageLoaderParms parms,
       const String& file,
       Uint32 line)
       :
       CIMException(code, parms)
   {
       CIMExceptionRep* rep;
       rep = reinterpret_cast<CIMExceptionRep*>(_rep);
       rep->file = file;
       rep->line = line;
   
   // l10n
           // Localize the cim message from the code.  Use the language of
           // the current thread.
           rep->contentLanguages = cimStatusCodeToString_Thread(rep->cimMessage, code);
   }
   
 TraceableCIMException::TraceableCIMException( TraceableCIMException::TraceableCIMException(
     CIMStatusCode code,     CIMStatusCode code,
     const String& message,     const String& message,
     const char* file,      const String& file,
     Uint32 line)     Uint32 line)
     :     :
     CIMException(code, message)     CIMException(code, message)
Line 245 
Line 322 
         const ContentLanguages& langs,         const ContentLanguages& langs,
     CIMStatusCode code,     CIMStatusCode code,
     const String& message,     const String& message,
     const char* file,      const String& file,
     Uint32 line)     Uint32 line)
     :     :
     CIMException(code, message)     CIMException(code, message)
Line 284 
Line 361 
 #else #else
     CIMExceptionRep* rep;     CIMExceptionRep* rep;
     rep = reinterpret_cast<CIMExceptionRep*>(_rep);     rep = reinterpret_cast<CIMExceptionRep*>(_rep);
 // l10n  - TODO uncomment when CIMStatus code is done  
         return _makeCIMExceptionDescription(rep->code, getMessage());  
 /*  
         if (rep->cimMessage == String::EMPTY)         if (rep->cimMessage == String::EMPTY)
         {         {
             return _makeCIMExceptionDescription(rep->code,             return _makeCIMExceptionDescription(rep->code,
Line 298 
Line 373 
                 return _makeCIMExceptionDescription(rep->cimMessage,                 return _makeCIMExceptionDescription(rep->cimMessage,
                                                                                         getMessage());                                                                                         getMessage());
         }         }
 */  
 #endif #endif
 } }
  
Line 317 
Line 392 
     return traceDescription;     return traceDescription;
 } }
  
   String TraceableCIMException::getCIMMessage() const
   {
       CIMExceptionRep* rep;
       rep = reinterpret_cast<CIMExceptionRep*>(_rep);
       return rep->cimMessage;
   }
   
   void TraceableCIMException::setCIMMessage(const String& cimMessage)
   {
       CIMExceptionRep* rep;
       rep = reinterpret_cast<CIMExceptionRep*>(_rep);
       rep->cimMessage = cimMessage;
   }
   
   String TraceableCIMException::getFile() const
   {
       CIMExceptionRep* rep;
       rep = reinterpret_cast<CIMExceptionRep*>(_rep);
       return rep->file;
   }
   
   Uint32 TraceableCIMException::getLine() const
   {
       CIMExceptionRep* rep;
       rep = reinterpret_cast<CIMExceptionRep*>(_rep);
       return rep->line;
   }
   
   const ContentLanguages& TraceableCIMException::getContentLanguages() const
   {
       CIMExceptionRep* rep;
       rep = reinterpret_cast<CIMExceptionRep*>(_rep);
       return rep->contentLanguages;
   }
   
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


Legend:
Removed from v.1.7  
changed lines
  Added in v.1.17

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2