Thrown when the simulation kernel or other components detect a runtime error. More...
#include <cexception.h>
Public Member Functions | |
cRuntimeError (OppErrorCode errcode,...) | |
cRuntimeError (const char *msg,...) | |
cRuntimeError (const cObject *where, OppErrorCode errcode,...) | |
cRuntimeError (const cObject *where, const char *msg,...) | |
cRuntimeError (const cRuntimeError &e) | |
virtual cRuntimeError * | dup () const |
Thrown when the simulation kernel or other components detect a runtime error.
For example, cSimpleModule::scheduleAt() throws this exception when the specified simulation time is in the past, or the message pointer is NULL.
cRuntimeError::cRuntimeError | ( | OppErrorCode | errcode, | |
... | ||||
) |
Error is identified by an error code, and the message comes from a string table.
The error string may expect printf-like arguments (s, d) which also have to be passed to the constructor.
cRuntimeError::cRuntimeError | ( | const char * | msg, | |
... | ||||
) |
To be called like printf().
The error code is set to eCUSTOM.
cRuntimeError::cRuntimeError | ( | const cObject * | where, | |
OppErrorCode | errcode, | |||
... | ||||
) |
Error is identified by an error code, and the message comes from a string table.
The error string may expect printf-like arguments (s, d) which also have to be passed to the constructor. The 1st arg is the object where the error occurred: its class and object name will be prepended to the message like this: "(cArray)arr".
cRuntimeError::cRuntimeError | ( | const cObject * | where, | |
const char * | msg, | |||
... | ||||
) |
To be called like printf().
The error code is set to eCUSTOM. The 1st arg is the object where the error occurred: its class and object name will be prepended to the message like this: "(cArray)arr".
virtual cRuntimeError* cRuntimeError::dup | ( | ) | const [inline, virtual] |
Virtual copy constructor.
We unfortunately need to copy exception objects when handing them back from an activity().
Reimplemented from cException.