version 1.82.12.1, 2008/02/13 20:43:59
|
version 1.83, 2008/01/08 20:15:09
|
|
|
delete _rep; | delete _rep; |
} | } |
| |
Exception& Exception::operator=(const Exception& exception) |
|
{ |
|
if (&exception != this) |
|
{ |
|
*this->_rep = *exception._rep; |
|
} |
|
return *this; |
|
} |
|
|
|
const String& Exception::getMessage() const | const String& Exception::getMessage() const |
{ | { |
return _rep->message; | return _rep->message; |
|
|
InvalidNameException::InvalidNameException(const String& message) | InvalidNameException::InvalidNameException(const String& message) |
: Exception(MessageLoaderParms( | : Exception(MessageLoaderParms( |
"Common.Exception.INVALID_NAME_EXCEPTION", | "Common.Exception.INVALID_NAME_EXCEPTION", |
"invalid CIM name: $0", |
"The CIM name is not valid: $0", |
message)) | message)) |
{ | { |
} | } |
|
|
tmp->line = 0; | tmp->line = 0; |
_rep = tmp; | _rep = tmp; |
} | } |
|
|
CIMException::CIMException(const CIMException & cimException) | CIMException::CIMException(const CIMException & cimException) |
: Exception() | : Exception() |
{ | { |
_rep = new CIMExceptionRep( |
CIMExceptionRep* tmp = new CIMExceptionRep(); |
*reinterpret_cast<CIMExceptionRep*>(cimException._rep)); |
CIMExceptionRep* rep; |
|
rep = reinterpret_cast<CIMExceptionRep*>(cimException._rep); |
|
tmp->message = rep->message; |
|
tmp->contentLanguages = rep->contentLanguages; |
|
tmp->cimMessage = rep->cimMessage; |
|
tmp->code = rep->code; |
|
tmp->file = rep->file; |
|
tmp->line = rep->line; |
|
tmp->errors = rep->errors; |
|
_rep = tmp; |
} | } |
| |
CIMException& CIMException::operator=(const CIMException & cimException) | CIMException& CIMException::operator=(const CIMException & cimException) |
{ | { |
if (&cimException != this) | if (&cimException != this) |
{ | { |
CIMExceptionRep* left = reinterpret_cast<CIMExceptionRep*>(this->_rep); |
CIMExceptionRep* left; |
CIMExceptionRep* right = |
CIMExceptionRep* right; |
reinterpret_cast<CIMExceptionRep*>(cimException._rep); |
left = reinterpret_cast<CIMExceptionRep*>(this->_rep); |
*left = *right; |
right = reinterpret_cast<CIMExceptionRep*>(cimException._rep); |
|
left->message = right->message; |
|
left->contentLanguages = right->contentLanguages; |
|
left->cimMessage = right->cimMessage; |
|
left->code = right->code; |
|
left->file = right->file; |
|
left->line = right->line; |
|
left->errors = right->errors; |
} | } |
return *this; | return *this; |
} | } |