version 1.4, 2002/09/11 21:20:24
|
version 1.5, 2002/09/20 01:14:55
|
|
|
char lineStr[32]; | char lineStr[32]; |
sprintf(lineStr, "%u", line); | sprintf(lineStr, "%u", line); |
| |
_message = file; |
_rep->message = file; |
_message.append("("); |
_rep->message.append("("); |
_message.append(lineStr); |
_rep->message.append(lineStr); |
_message.append("): "); |
_rep->message.append("): "); |
_message.append(message); |
_rep->message.append(message); |
| |
// ATTN-RK-P3-20020408: Should define a "test" trace component | // ATTN-RK-P3-20020408: Should define a "test" trace component |
PEG_TRACE_STRING(TRC_SERVER, Tracer::LEVEL2, _message); |
PEG_TRACE_STRING(TRC_SERVER, Tracer::LEVEL2, _rep->message); |
} | } |
| |
const char NullPointer::MSG[] = "null pointer"; | const char NullPointer::MSG[] = "null pointer"; |
|
|
: | : |
CIMException(code, message) | CIMException(code, message) |
{ | { |
_rep->file = file; |
CIMExceptionRep* rep; |
_rep->line = line; |
rep = reinterpret_cast<CIMExceptionRep*>(_rep); |
|
rep->file = file; |
|
rep->line = line; |
} | } |
| |
TraceableCIMException::TraceableCIMException(const CIMException & cimException) | TraceableCIMException::TraceableCIMException(const CIMException & cimException) |
: CIMException(cimException.getCode(), cimException.getMessage()) | : CIMException(cimException.getCode(), cimException.getMessage()) |
{ | { |
TraceableCIMException * t = (TraceableCIMException *)&cimException; | TraceableCIMException * t = (TraceableCIMException *)&cimException; |
_rep->file = t->_rep->file; |
CIMExceptionRep* left; |
_rep->line = t->_rep->line; |
CIMExceptionRep* right; |
|
left = reinterpret_cast<CIMExceptionRep*>(_rep); |
|
right = reinterpret_cast<CIMExceptionRep*>(t->_rep); |
|
left->file = right->file; |
|
left->line = right->line; |
} | } |
| |
// | // |
|
|
#ifdef PEGASUS_DEBUG_CIMEXCEPTION | #ifdef PEGASUS_DEBUG_CIMEXCEPTION |
return getTraceDescription(); | return getTraceDescription(); |
#else | #else |
return _makeCIMExceptionDescription(_rep->code, getMessage()); |
CIMExceptionRep* rep; |
|
rep = reinterpret_cast<CIMExceptionRep*>(_rep); |
|
return _makeCIMExceptionDescription(rep->code, getMessage()); |
#endif | #endif |
} | } |
| |
|
|
// | // |
String TraceableCIMException::getTraceDescription() const | String TraceableCIMException::getTraceDescription() const |
{ | { |
|
CIMExceptionRep* rep; |
|
rep = reinterpret_cast<CIMExceptionRep*>(_rep); |
String traceDescription = | String traceDescription = |
_makeCIMExceptionDescription( | _makeCIMExceptionDescription( |
_rep->code, getMessage(), _rep->file, _rep->line); |
rep->code, getMessage(), rep->file, rep->line); |
| |
return traceDescription; | return traceDescription; |
} | } |