(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.77 and 1.78

version 1.77, 2006/01/30 16:16:52 version 1.78, 2006/10/30 13:02:53
Line 413 
Line 413 
         _rep->message.append(MessageLoader::getMessage(msgParms));         _rep->message.append(MessageLoader::getMessage(msgParms));
 } }
  
   
 //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
 // //
 // CIMException // CIMException
Line 438 
Line 437 
     _rep = tmp;     _rep = tmp;
 } }
  
   
   // l10n - note - use this when you have an exception
   // an untranslated detail message and an attached CIM_Error
   // The pegasus message associated with code will be translated.
   CIMException::CIMException(
       CIMStatusCode code,
       const String& message,
       const CIMInstance& instance)
       : Exception()
   {
       CIMExceptionRep * tmp = new CIMExceptionRep ();
       tmp->message = message;
       tmp->code = code;
       tmp->file = "";
       tmp->errors.append(instance);
       tmp->line = 0;
       tmp->contentLanguages.clear();
       tmp->cimMessage = String::EMPTY;
       _rep = tmp;
   }
   
   // l10n - note - use this when you have an exception
   // an untranslated detail message and an attached CIM_Error
   // array
   // The pegasus message associated with code will be translated.
   CIMException::CIMException(
       CIMStatusCode code,
       const String& message,
       const Array<CIMInstance>& instances)
       : Exception()
   {
       CIMExceptionRep * tmp = new CIMExceptionRep ();
       tmp->message = message;
       tmp->code = code;
       tmp->file = "";
       tmp->errors.appendArray(instances);
       tmp->line = 0;
       tmp->contentLanguages.clear();
       tmp->cimMessage = String::EMPTY;
       _rep = tmp;
   }
 // l10n - note use this when you have an exception with a translated // l10n - note use this when you have an exception with a translated
 // detail message // detail message
 // l10n // l10n
Line 458 
Line 498 
     _rep = tmp;     _rep = tmp;
 } }
  
   CIMException::CIMException(
       CIMStatusCode code,
       const MessageLoaderParms& msgParms,
       const CIMInstance& instance)
       : Exception()
   {
       CIMExceptionRep * tmp = new CIMExceptionRep ();
       tmp->message = MessageLoader::getMessage(
           const_cast<MessageLoaderParms &>(msgParms));
       // Must be after MessageLoader::getMessage call
       tmp->contentLanguages = msgParms.contentlanguages;
       tmp->cimMessage = String::EMPTY;
       tmp->errors.append(instance);
       tmp->code = code;
       tmp->file = "";
       tmp->line = 0;
       _rep = tmp;
   }
   
   CIMException::CIMException(
       CIMStatusCode code,
       const MessageLoaderParms& msgParms,
       const Array<CIMInstance>& instances)
       : Exception()
   {
       CIMExceptionRep * tmp = new CIMExceptionRep ();
       tmp->message = MessageLoader::getMessage(
           const_cast<MessageLoaderParms &>(msgParms));
       // Must be after MessageLoader::getMessage call
       tmp->contentLanguages = msgParms.contentlanguages;
       tmp->cimMessage = String::EMPTY;
       tmp->errors.appendArray(instances);
       tmp->code = code;
       tmp->file = "";
       tmp->line = 0;
       _rep = tmp;
   }
 CIMException::CIMException(const CIMException & cimException) CIMException::CIMException(const CIMException & cimException)
     : Exception()     : Exception()
 { {
Line 470 
Line 547 
     tmp->code = rep->code;     tmp->code = rep->code;
     tmp->file = rep->file;     tmp->file = rep->file;
     tmp->line = rep->line;     tmp->line = rep->line;
       tmp->errors = rep->errors;
     _rep = tmp;     _rep = tmp;
 } }
  
Line 487 
Line 565 
         left->code = right->code;         left->code = right->code;
         left->file = right->file;         left->file = right->file;
         left->line = right->line;         left->line = right->line;
               left->errors = right->errors;
     }     }
     return *this;     return *this;
 } }
Line 495 
Line 574 
 { {
 } }
  
   Uint32 CIMException::getErrorCount() const
   {
       return reinterpret_cast<CIMExceptionRep*>(_rep)->errors.size();
   }
   /**************
   CIMInstance CIMException::getError(Uint32 index)
   {
       return reinterpret_cast<CIMExceptionRep*>(_rep)->errors[index];
   }
   ***************/
   
   CIMConstInstance CIMException::getError(Uint32 index) const
   {
       return reinterpret_cast<CIMExceptionRep*>(_rep)->errors[index];
   }
   
   void CIMException::addError(const CIMInstance& instance)
   {
       return reinterpret_cast<CIMExceptionRep*>(_rep)->errors.append(instance);
   }
   
 CIMStatusCode CIMException::getCode() const CIMStatusCode CIMException::getCode() const
 { {
     CIMExceptionRep* rep;     CIMExceptionRep* rep;


Legend:
Removed from v.1.77  
changed lines
  Added in v.1.78

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2