16 #ifndef __OMNETPP_CEXCEPTION_H 17 #define __OMNETPP_CEXCEPTION_H 22 #include "simkerneldefs.h" 23 #include "simtime_t.h" 41 typedef int ErrorCodeInt;
59 std::string contextClassName;
60 std::string contextFullPath;
61 int contextComponentId;
62 int contextComponentKind;
69 void init(
const cObject *obj, ErrorCode errorcode,
const char *fmt, va_list va);
86 void exitIfStartupError();
147 virtual void prependMessage(
const char *txt) {msg = std::string(txt) +
": " + msg;}
166 virtual const char *
what()
const throw()
override {
return msg.c_str();}
173 virtual std::string getFormattedMessage()
const;
269 virtual bool isError()
const override {
return false;}
286 bool displayed =
false;
363 virtual bool isError()
const override {
return false;}
398 virtual bool isError()
const override {
return false;}
cStackCleanupException(const cStackCleanupException &e)
Definition: cexception.h:387
virtual cDeleteModuleException * dup() const override
Definition: cexception.h:358
Thrown when the simulation kernel or other components detect a runtime error.
Definition: cexception.h:282
Root of the OMNeT++ class hierarchy. cObject is a lightweight class without any data members...
Definition: cobject.h:58
int64_t-based, base-10 fixed-point simulation time.
Definition: simtime.h:66
virtual cException * dup() const
Definition: cexception.h:129
virtual int getContextComponentKind() const
Definition: cexception.h:224
virtual ~cException()
Definition: cexception.h:134
virtual bool isError() const override
Definition: cexception.h:398
virtual simtime_t getSimtime() const
Definition: cexception.h:191
virtual bool isError() const override
Definition: cexception.h:269
cRuntimeError(const cRuntimeError &e)
Definition: cexception.h:325
virtual int getContextComponentId() const
Definition: cexception.h:218
cDeleteModuleException()
Definition: cexception.h:346
virtual bool isError() const override
Definition: cexception.h:363
virtual const char * getContextClassName() const
Definition: cexception.h:204
virtual cStackCleanupException * dup() const override
Definition: cexception.h:393
virtual int getErrorCode() const
Definition: cexception.h:161
virtual void setMessage(const char *txt)
Definition: cexception.h:142
cDeleteModuleException(const cDeleteModuleException &e)
Definition: cexception.h:352
virtual bool isError() const
Definition: cexception.h:156
virtual int getSimulationStage() const
Definition: cexception.h:181
cTerminationException(const cTerminationException &e)
Definition: cexception.h:257
cStackCleanupException()
Definition: cexception.h:381
virtual void prependMessage(const char *txt)
Definition: cexception.h:147
Thrown when the simulation is completed without error.
Definition: cexception.h:238
int64_t eventnumber_t
Sequence number of events during the simulation. Events are numbered from one. (Event number zero is ...
Definition: simkerneldefs.h:78
virtual const char * getContextFullPath() const
Definition: cexception.h:210
Definition: cabstracthistogram.h:21
virtual cTerminationException * dup() const override
Definition: cexception.h:263
virtual eventnumber_t getEventNumber() const
Definition: cexception.h:186
virtual cRuntimeError * dup() const override
Definition: cexception.h:331
virtual const char * what() const override
Definition: cexception.h:166
Exception class.
Definition: cexception.h:48
virtual bool hasContext() const
Definition: cexception.h:198
Used internally when deleting an activity() simple module.
Definition: cexception.h:375
Thrown from cSimpleModule::deleteModule() when the current module is about to be deleted, in order to exit that module immediately.
Definition: cexception.h:340