(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.73.4.1 and 1.81.4.2

version 1.73.4.1, 2004/12/01 03:23:47 version 1.81.4.2, 2008/02/13 20:45:48
Line 1 
Line 1 
 //%2004////////////////////////////////////////////////////////////////////////  //%2006////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
Line 6 
Line 6 
 // IBM Corp.; EMC Corporation, The Open Group. // IBM Corp.; EMC Corporation, The Open Group.
 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. // 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 25 
Line 29 
 // //
 //============================================================================== //==============================================================================
 // //
 // Author: Mike Brasher (mbrasher@bmc.com)  
 //  
 // Modified By: Nag Boranna, Hewlett-Packard Company (nagaraja_boranna@hp.com)  
 //              Jenny Yu, Hewlett-Packard Company (jenny_yu@hp.com)  
 //              Carol Ann Krug Graves, Hewlett-Packard Company  
 //                (carolann_graves@hp.com)  
 //              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)  
 //              Sushma Fernandes , Hewlett-Packard Company  
 //                (sushma_fernandes@hp.com)  
 //              Amit K Arora, IBM (amita@in.ibm.com) for bug# 1593  
 //  
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #include <cstdio> #include <cstdio>
Line 50 
Line 43 
 { {
     _rep = new ExceptionRep();     _rep = new ExceptionRep();
     _rep->message = message;     _rep->message = message;
     _rep->contentLanguages = ContentLanguages::EMPTY;  // l10n      _rep->contentLanguages.clear();
 } }
  
 Exception::Exception(const Exception& exception) Exception::Exception(const Exception& exception)
 { {
     _rep = new ExceptionRep();     _rep = new ExceptionRep();
     _rep->message = exception._rep->message;     _rep->message = exception._rep->message;
     _rep->contentLanguages = exception._rep->contentLanguages;    // l10n      _rep->contentLanguages = exception._rep->contentLanguages;
 } }
  
 // l10n  
 Exception::Exception(const MessageLoaderParms& msgParms) Exception::Exception(const MessageLoaderParms& msgParms)
 { {
     _init(msgParms);  
 }  
   
 void Exception::_init(const MessageLoaderParms& msgParms)  
 {  
     _rep = new ExceptionRep();     _rep = new ExceptionRep();
     _rep->message = MessageLoader::getMessage(     _rep->message = MessageLoader::getMessage(
         const_cast<MessageLoaderParms &>(msgParms));         const_cast<MessageLoaderParms &>(msgParms));
Line 75 
Line 62 
     _rep->contentLanguages = msgParms.contentlanguages;     _rep->contentLanguages = msgParms.contentlanguages;
 } }
  
 //{/////////////////////////////////////////////////////////////////////////////  Exception::Exception()
   
 Exception::Exception(  
     String id,  
     String msg,  
     Formatter::Arg arg0,  
     Formatter::Arg arg1,  
     Formatter::Arg arg2,  
     Formatter::Arg arg3,  
     Formatter::Arg arg4,  
     Formatter::Arg arg5,  
     Formatter::Arg arg6,  
     Formatter::Arg arg7,  
     Formatter::Arg arg8,  
     Formatter::Arg arg9)  
 {  
     _init(MessageLoaderParms(id, msg, arg0, arg1, arg2, arg3, arg4, arg5,  
         arg6, arg7, arg8, arg9));  
 }  
   
 Exception::Exception(  
     String id,  
     String msg)  
 {  
     _init(MessageLoaderParms(id, msg));  
 }  
   
 Exception::Exception(  
     String id,  
     String msg,  
     Formatter::Arg arg0)  
 {  
     _init(MessageLoaderParms(id, msg, arg0));  
 }  
   
 Exception::Exception(  
     String id,  
     String msg,  
     Formatter::Arg arg0,  
     Formatter::Arg arg1)  
 {  
     _init(MessageLoaderParms(id, msg, arg0, arg1));  
 }  
   
 Exception::Exception(  
     String id,  
     String msg,  
     Formatter::Arg arg0,  
     Formatter::Arg arg1,  
     Formatter::Arg arg2)  
 {  
     _init(MessageLoaderParms(id, msg, arg0, arg1, arg2));  
 }  
   
 Exception::Exception(  
     String id,  
     String msg,  
     Formatter::Arg arg0,  
     Formatter::Arg arg1,  
     Formatter::Arg arg2,  
     Formatter::Arg arg3)  
 {  
     _init(MessageLoaderParms(id, msg, arg0, arg1, arg2, arg3));  
 }  
   
 Exception::Exception(  
     const char* id,  
     const char* msg)  
 { {
     _init(MessageLoaderParms(id, msg));      _rep = NULL;
 } }
  
 Exception::Exception(  Exception::~Exception()
     const char* id,  
     const char* msg,  
     const String& arg0)  
 { {
     _init(MessageLoaderParms(id, msg, arg0));      delete _rep;
 } }
  
 Exception::Exception(  Exception& Exception::operator=(const Exception& exception)
     const char* id,  
     const char* msg,  
     const String& arg0,  
     const String& arg1)  
 { {
     _init(MessageLoaderParms(id, msg, arg0, arg1));      if (&exception != this)
 }  
   
 //}/////////////////////////////////////////////////////////////////////////////  
   
 Exception::Exception()  
 { {
     _rep = NULL;          *this->_rep = *exception._rep;
 } }
       return *this;
 Exception::~Exception()  
 {  
     delete _rep;  
 } }
  
 const String& Exception::getMessage() const const String& Exception::getMessage() const
Line 181 
Line 86 
     return _rep->message;     return _rep->message;
 } }
  
 // l10n  const ContentLanguageList& Exception::getContentLanguages() const
 const ContentLanguages& Exception::getContentLanguages() const  
 { {
         return _rep->contentLanguages;         return _rep->contentLanguages;
 } }
  
 // l10n  void Exception::setContentLanguages(const ContentLanguageList& langs)
 void Exception::setContentLanguages(const ContentLanguages& langs)  
 { {
         _rep->contentLanguages = langs;         _rep->contentLanguages = langs;
 } }
  
 /*  
 IndexOutOfBoundsException::IndexOutOfBoundsException()  
     : Exception("index out of bounds")  
 {  
 }  
 */  
   
 IndexOutOfBoundsException::IndexOutOfBoundsException() IndexOutOfBoundsException::IndexOutOfBoundsException()
     : Exception("Common.Exception.INDEX_OUT_OF_BOUNDS_EXCEPTION","index out of bounds")      : Exception(MessageLoaderParms(
             "Common.Exception.INDEX_OUT_OF_BOUNDS_EXCEPTION",
             "index out of bounds"))
 { {
 } }
  
 /*  
 AlreadyExistsException::AlreadyExistsException(const String& message) AlreadyExistsException::AlreadyExistsException(const String& message)
     : Exception("already exists: " + message)      : Exception(MessageLoaderParms(
 {            "Common.Exception.ALREADY_EXISTS_EXCEPTION",
 }  
 */  
   
 AlreadyExistsException::AlreadyExistsException(const String& message)  
     : Exception("Common.Exception.ALREADY_EXISTS_EXCEPTION",  
                                                                 "already exists: $0",                                                                 "already exists: $0",
                                                                  message)            message))
 { {
 } }
  
 AlreadyExistsException::AlreadyExistsException(MessageLoaderParms& msgParms) AlreadyExistsException::AlreadyExistsException(MessageLoaderParms& msgParms)
     : Exception("Common.Exception.ALREADY_EXISTS_EXCEPTION",      : Exception(MessageLoaderParms(
                                                                 "already exists: ")            "Common.Exception.ALREADY_EXISTS_EXCEPTION",
 {            "already exists: $0",
         _rep->message.append(MessageLoader::getMessage(msgParms));            MessageLoader::getMessage(msgParms)))
 }  
   
 /*  
 InvalidNameException::InvalidNameException(const String& name)  
     : Exception("invalid CIM name: " + name)  
 { {
 } }
 */  
  
 InvalidNameException::InvalidNameException(const String& message) InvalidNameException::InvalidNameException(const String& message)
     : Exception("Common.Exception.INVALID_NAME_EXCEPTION",      : Exception(MessageLoaderParms(
             "Common.Exception.INVALID_NAME_EXCEPTION",
                                                                 "invalid CIM name: $0",                                                                 "invalid CIM name: $0",
                                                                  message)            message))
 { {
 } }
  
 InvalidNameException::InvalidNameException(MessageLoaderParms& msgParms) InvalidNameException::InvalidNameException(MessageLoaderParms& msgParms)
     : Exception("Common.Exception.INVALID_NAME_EXCEPTION",      : Exception(MessageLoaderParms(
                                                                 "invalid CIM name: ")            "Common.Exception.INVALID_NAME_EXCEPTION",
 {            "invalid CIM name: $0",
         _rep->message.append(MessageLoader::getMessage(msgParms));            MessageLoader::getMessage(msgParms)))
 }  
   
 /*  
 InvalidNamespaceNameException::InvalidNamespaceNameException(const String& name)  
     : Exception("invalid CIM namespace name: " + name)  
 { {
 } }
 */  
   
  
 InvalidNamespaceNameException::InvalidNamespaceNameException(const String& name) InvalidNamespaceNameException::InvalidNamespaceNameException(const String& name)
     : Exception("Common.Exception.INVALID_NAMESACE_NAME_EXCEPTION",      : Exception(MessageLoaderParms(
             "Common.Exception.INVALID_NAMESACE_NAME_EXCEPTION",
                                                                 "invalid CIM namespace name: $0",                                                                 "invalid CIM namespace name: $0",
                                                                  name)            name))
 {  
 }  
   
 InvalidNamespaceNameException::InvalidNamespaceNameException(MessageLoaderParms& msgParms)  
     : Exception("Common.Exception.INVALID_NAMESPACE_NAME_EXCEPTION",  
                                                                 "invalid CIM namespace name: ")  
 { {
         _rep->message.append(MessageLoader::getMessage(msgParms));  
 } }
  
 /*  InvalidNamespaceNameException::InvalidNamespaceNameException(
 UninitializedObjectException::UninitializedObjectException()      MessageLoaderParms& msgParms)
     : Exception("uninitialized object")      : Exception(MessageLoaderParms(
             "Common.Exception.INVALID_NAMESPACE_NAME_EXCEPTION",
             "invalid CIM namespace name: $0",
             MessageLoader::getMessage(msgParms)))
 { {
 } }
 */  
  
 UninitializedObjectException::UninitializedObjectException() UninitializedObjectException::UninitializedObjectException()
     : Exception("Common.Exception.UNINITIALIZED_OBJECT_EXCEPTION",      : Exception(MessageLoaderParms(
                                                                 "uninitialized object")            "Common.Exception.UNINITIALIZED_OBJECT_EXCEPTION",
 {            "uninitialized object"))
 }  
   
 /*  
 TypeMismatchException::TypeMismatchException()  
     : Exception("type mismatch")  
 { {
 } }
 */  
  
 TypeMismatchException::TypeMismatchException() TypeMismatchException::TypeMismatchException()
     : Exception("Common.Exception.TYPE_MISMATCH_EXCEPTION",      : Exception(MessageLoaderParms(
                                                                 "type mismatch")            "Common.Exception.TYPE_MISMATCH_EXCEPTION",
             "type mismatch"))
 { {
 } }
  
 TypeMismatchException::TypeMismatchException(const String& message) TypeMismatchException::TypeMismatchException(const String& message)
     : Exception("Common.Exception.TYPE_MISMATCH_EXCEPTION",      : Exception(MessageLoaderParms(
                                                                 "type mismatch: $0",message)            "Common.Exception.TYPE_MISMATCH_EXCEPTION",
             "type mismatch: $0",message))
 { {
  
 } }
  
 TypeMismatchException::TypeMismatchException(MessageLoaderParms& msgParms) TypeMismatchException::TypeMismatchException(MessageLoaderParms& msgParms)
     : Exception("Common.Exception.TYPE_MISMATCH_EXCEPTION",      : Exception(MessageLoaderParms(
                                                                 "type mismatch: ")            "Common.Exception.TYPE_MISMATCH_EXCEPTION",
             "type mismatch: $0",
             MessageLoader::getMessage(msgParms)))
 { {
     _rep->message.append(MessageLoader::getMessage(msgParms));  
 } }
  
 /*  
 DynamicCastFailedException::DynamicCastFailedException() DynamicCastFailedException::DynamicCastFailedException()
     : Exception("dynamic cast failed")      : Exception(MessageLoaderParms(
 {            "Common.Exception.DYNAMIC_CAST_FAILED_EXCEPTION",
 }            "dynamic cast failed"))
 */  
   
 DynamicCastFailedException::DynamicCastFailedException()  
     : Exception("Common.Exception.DYNAMIC_CAST_FAILED_EXCEPTION",  
                                                                 "dynamic cast failed")  
 {  
 }  
   
 /*  
 InvalidDateTimeFormatException::InvalidDateTimeFormatException()  
     : Exception("invalid datetime format")  
 { {
 } }
 */  
  
 InvalidDateTimeFormatException::InvalidDateTimeFormatException() InvalidDateTimeFormatException::InvalidDateTimeFormatException()
     : Exception("Common.Exception.INVALID_DATETIME_FORMAT_EXCEPTION",      : Exception(MessageLoaderParms(
                                                                 "invalid datetime format")            "Common.Exception.INVALID_DATETIME_FORMAT_EXCEPTION",
             "invalid datetime format"))
 { {
 } }
  
 /*  
 MalformedObjectNameException::MalformedObjectNameException( MalformedObjectNameException::MalformedObjectNameException(
     const String& objectName)      const String& message)
     : Exception("malformed object name: " + objectName)      : Exception(MessageLoaderParms(
 {            "Common.Exception.MALFORMED_OBJECT_NAME_EXCEPTION",
 }  
 */  
   
 MalformedObjectNameException::MalformedObjectNameException(const String& message)  
     : Exception("Common.Exception.MALFORMED_OBJECT_NAME_EXCEPTION",  
                                                                 "malformed object name: $0",                                                                 "malformed object name: $0",
                                                                  message)            message))
 {  
 }  
   
 MalformedObjectNameException::MalformedObjectNameException(MessageLoaderParms& msgParms)  
     : Exception("Common.Exception.MALFORMED_OBJECT_NAME_EXCEPTION",  
                                                                 "malformed object name: ")  
 { {
         _rep->message.append(MessageLoader::getMessage(msgParms));  
 } }
  
 /*  MalformedObjectNameException::MalformedObjectNameException(
 BindFailedException::BindFailedException(const String& message)      MessageLoaderParms& msgParms)
     : Exception("Bind failed: " + message)      : Exception(MessageLoaderParms(
             "Common.Exception.MALFORMED_OBJECT_NAME_EXCEPTION",
             "malformed object name: $0",
             MessageLoader::getMessage(msgParms)))
 { {
 } }
 */  
  
 BindFailedException::BindFailedException(const String& message) BindFailedException::BindFailedException(const String& message)
     : Exception("Common.Exception.BIND_FAILED_EXCEPTION",      : Exception(MessageLoaderParms(
             "Common.Exception.BIND_FAILED_EXCEPTION",
                                                                 "Bind failed: $0",                                                                 "Bind failed: $0",
                                                                  message)            message))
 { {
 } }
  
 BindFailedException::BindFailedException(MessageLoaderParms& msgParms) BindFailedException::BindFailedException(MessageLoaderParms& msgParms)
     : Exception("Common.Exception.BIND_FAILED_EXCEPTION",      : Exception(MessageLoaderParms(
                                                                 "Bind failed: ")            "Common.Exception.BIND_FAILED_EXCEPTION",
 {            "Bind failed: $0",
         _rep->message.append(MessageLoader::getMessage(msgParms));            MessageLoader::getMessage(msgParms)))
 }  
   
 /*  
 InvalidLocatorException::InvalidLocatorException(const String& locator)  
     : Exception("Invalid locator: " + locator)  
 { {
 } }
 */  
  
 InvalidLocatorException::InvalidLocatorException(const String& message) InvalidLocatorException::InvalidLocatorException(const String& message)
     : Exception("Common.Exception.INVALID_LOCATOR_EXCEPTION",      : Exception(MessageLoaderParms(
             "Common.Exception.INVALID_LOCATOR_EXCEPTION",
                                                                 "Invalid locator: $0",                                                                 "Invalid locator: $0",
                                                                  message)            message))
 { {
 } }
  
 InvalidLocatorException::InvalidLocatorException(MessageLoaderParms& msgParms) InvalidLocatorException::InvalidLocatorException(MessageLoaderParms& msgParms)
     : Exception("Common.Exception.INVALID_LOCATOR_EXCEPTION",      : Exception(MessageLoaderParms(
                                                                 "Invalid locator: ")            "Common.Exception.INVALID_LOCATOR_EXCEPTION",
 {            "Invalid locator: $0",
         _rep->message.append(MessageLoader::getMessage(msgParms));            MessageLoader::getMessage(msgParms)))
 }  
   
 /*  
 CannotCreateSocketException::CannotCreateSocketException()  
     : Exception("Cannot create socket")  
 { {
 } }
 */  
  
 CannotCreateSocketException::CannotCreateSocketException() CannotCreateSocketException::CannotCreateSocketException()
     : Exception("Common.Exception.CANNOT_CREATE_SOCKET_EXCEPTION",      : Exception(MessageLoaderParms(
                                                                 "Cannot create socket")            "Common.Exception.CANNOT_CREATE_SOCKET_EXCEPTION",
             "Cannot create socket"))
 { {
 } }
  
Line 424 
Line 265 
 { {
 } }
  
 /*  
 AlreadyConnectedException::AlreadyConnectedException()  
     : Exception("already connected")  
 {  
 }  
 */  
   
 AlreadyConnectedException::AlreadyConnectedException() AlreadyConnectedException::AlreadyConnectedException()
     : Exception("Common.Exception.ALREADY_CONNECTED_EXCEPTION",      : Exception(MessageLoaderParms(
                                                                 "already connected")            "Common.Exception.ALREADY_CONNECTED_EXCEPTION",
             "already connected"))
 { {
 } }
  
 /*  
 NotConnectedException::NotConnectedException()  
     : Exception("not connected")  
 {  
 }  
 */  
  
 NotConnectedException::NotConnectedException() NotConnectedException::NotConnectedException()
     : Exception("Common.Exception.NOT_CONNECTED_EXCEPTION",      : Exception(MessageLoaderParms(
                                                                 "not connected")            "Common.Exception.NOT_CONNECTED_EXCEPTION",
             "not connected"))
 { {
 } }
  
 /*  
 ConnectionTimeoutException::ConnectionTimeoutException() ConnectionTimeoutException::ConnectionTimeoutException()
     : Exception("connection timed out")      : Exception(MessageLoaderParms(
 {            "Common.Exception.CONNECTION_TIMEOUT_EXCEPTION",
 }            "connection timed out"))
 */  
   
 ConnectionTimeoutException::ConnectionTimeoutException()  
     : Exception("Common.Exception.CONNECTION_TIMEOUT_EXCEPTION",  
                                                                 "connection timed out")  
 {  
 }  
   
 /*  
 SSLException::SSLException(const String& message)  
     : Exception("SSL Exception: " + message)  
 { {
 } }
 */  
  
 SSLException::SSLException(const String& message) SSLException::SSLException(const String& message)
     : Exception("Common.Exception.SSL_EXCEPTION",      : Exception(MessageLoaderParms(
             "Common.Exception.SSL_EXCEPTION",
                                                                 "SSL Exception: $0" ,                                                                 "SSL Exception: $0" ,
                                                                  message)            message))
 { {
 } }
  
 SSLException::SSLException(MessageLoaderParms& msgParms) SSLException::SSLException(MessageLoaderParms& msgParms)
     : Exception("Common.Exception.SSL_EXCEPTION",      : Exception(MessageLoaderParms(
                                                                 "SSL Exception: " )            "Common.Exception.SSL_EXCEPTION",
 {            "SSL Exception: $0",
         _rep->message.append(MessageLoader::getMessage(msgParms));            MessageLoader::getMessage(msgParms)))
 }  
   
 /*  
 DateTimeOutOfRangeException::DateTimeOutOfRangeException(const String& message)  
     : Exception("DateTime is out of range : " + message)  
 { {
 } }
 */  
  
 DateTimeOutOfRangeException::DateTimeOutOfRangeException(const String& message) DateTimeOutOfRangeException::DateTimeOutOfRangeException(const String& message)
     : Exception("Common.Exception.DATETIME_OUT_OF_RANGE_EXCEPTION",      : Exception(MessageLoaderParms(
             "Common.Exception.DATETIME_OUT_OF_RANGE_EXCEPTION",
                                                                 "DateTime is out of range : $0" ,                                                                 "DateTime is out of range : $0" ,
                                                                  message)            message))
 { {
 } }
  
 DateTimeOutOfRangeException::DateTimeOutOfRangeException(MessageLoaderParms& msgParms)  DateTimeOutOfRangeException::DateTimeOutOfRangeException(
     : Exception("Common.Exception.DATETIME_OUT_OF_RANGE_EXCEPTION",      MessageLoaderParms& msgParms)
                                                                 "DateTime is out of range : " )      : Exception(MessageLoaderParms(
             "Common.Exception.DATETIME_OUT_OF_RANGE_EXCEPTION",
             "DateTime is out of range : $0",
             MessageLoader::getMessage(msgParms)))
 { {
         _rep->message.append(MessageLoader::getMessage(msgParms));  
 } }
  
   
 //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
 // //
 // CIMException // CIMException
Line 525 
Line 339 
     tmp->code = code;     tmp->code = code;
     tmp->file = "";     tmp->file = "";
     tmp->line = 0;     tmp->line = 0;
     tmp->contentLanguages = ContentLanguages::EMPTY;      tmp->contentLanguages.clear();
     tmp->cimMessage = String::EMPTY;     tmp->cimMessage = String::EMPTY;
     _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  
 CIMException::CIMException( CIMException::CIMException(
     CIMStatusCode code,     CIMStatusCode code,
     const MessageLoaderParms& msgParms)     const MessageLoaderParms& msgParms)
Line 550 
Line 404 
     _rep = tmp;     _rep = tmp;
 } }
  
 CIMException::CIMException(const CIMException & cimException)  CIMException::CIMException(
       CIMStatusCode code,
       const MessageLoaderParms& msgParms,
       const CIMInstance& instance)
     : Exception()     : Exception()
 { {
     CIMExceptionRep * tmp = new CIMExceptionRep ();     CIMExceptionRep * tmp = new CIMExceptionRep ();
     CIMExceptionRep * rep;      tmp->message = MessageLoader::getMessage(
     rep = reinterpret_cast<CIMExceptionRep*>(cimException._rep);          const_cast<MessageLoaderParms &>(msgParms));
     tmp->message = rep->message;      // Must be after MessageLoader::getMessage call
     tmp->contentLanguages = rep->contentLanguages;  // l10n      tmp->contentLanguages = msgParms.contentlanguages;
     tmp->cimMessage = rep->cimMessage;  // l10n      tmp->cimMessage = String::EMPTY;
     tmp->code = rep->code;      tmp->errors.append(instance);
     tmp->file = rep->file;      tmp->code = code;
     tmp->line = rep->line;      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;     _rep = tmp;
 } }
  
   CIMException::CIMException(const CIMException & cimException)
       : Exception()
   {
       _rep = new CIMExceptionRep(
           *reinterpret_cast<CIMExceptionRep*>(cimException._rep));
   }
   
 CIMException& CIMException::operator=(const CIMException & cimException) CIMException& CIMException::operator=(const CIMException & cimException)
 { {
     if (&cimException != this)     if (&cimException != this)
     {     {
         CIMExceptionRep* left;          CIMExceptionRep* left = reinterpret_cast<CIMExceptionRep*>(this->_rep);
         CIMExceptionRep* right;          CIMExceptionRep* right =
         left = reinterpret_cast<CIMExceptionRep*>(this->_rep);              reinterpret_cast<CIMExceptionRep*>(cimException._rep);
         right = reinterpret_cast<CIMExceptionRep*>(cimException._rep);          *left = *right;
         left->message = right->message;  
         left->contentLanguages = right->contentLanguages;  // l10n  
         left->cimMessage = right->cimMessage;  // l10n  
         left->code = right->code;  
         left->file = right->file;  
         left->line = right->line;  
     }     }
     return *this;     return *this;
 } }
Line 587 
Line 465 
 { {
 } }
  
   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)
   {
       reinterpret_cast<CIMExceptionRep*>(_rep)->errors.append(instance);
   }
   
 CIMStatusCode CIMException::getCode() const CIMStatusCode CIMException::getCode() const
 { {
     CIMExceptionRep* rep;     CIMExceptionRep* rep;


Legend:
Removed from v.1.73.4.1  
changed lines
  Added in v.1.81.4.2

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2