16 #ifndef __OMNETPP_CEXCEPTION_H 17 #define __OMNETPP_CEXCEPTION_H 22 #include "simkerneldefs.h" 23 #include "simtime_t.h" 42 typedef int ErrorCodeInt;
60 std::string contextClassName;
61 std::string contextFullPath;
62 int contextComponentId;
63 int contextComponentKind;
70 void init(
const cObject *obj, ErrorCode errorcode,
const char *fmt, va_list va);
87 void exitIfStartupError();
148 virtual void prependMessage(
const char *txt) {msg = std::string(txt) +
": " + msg;}
167 virtual const char *
what()
const throw()
override {
return msg.c_str();}
174 virtual std::string getFormattedMessage()
const;
270 virtual bool isError()
const override {
return false;}
287 bool displayed =
false;
372 virtual bool isError()
const override {
return false;}
407 virtual bool isError()
const override {
return false;}
cStackCleanupException(const cStackCleanupException &e)
Definition: cexception.h:396
virtual cDeleteModuleException * dup() const override
Definition: cexception.h:362
Thrown when the simulation kernel or other components detect a runtime error.
Definition: cexception.h:283
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()
Definition: cexception.h:135
virtual bool isError() const override
Definition: cexception.h:407
virtual bool isError() const override
Definition: cexception.h:270
virtual int getContextComponentKind() const
Definition: cexception.h:225
cRuntimeError(const cRuntimeError &e)
Definition: cexception.h:326
virtual const char * getContextClassName() const
Definition: cexception.h:205
virtual const char * getContextFullPath() const
Definition: cexception.h:211
virtual bool isError() const override
Definition: cexception.h:372
virtual cStackCleanupException * dup() const override
Definition: cexception.h:402
This class represents modules in the simulation.
Definition: cmodule.h:47
virtual void setMessage(const char *txt)
Definition: cexception.h:143
cDeleteModuleException(const cDeleteModuleException &e)
Definition: cexception.h:356
cTerminationException(const cTerminationException &e)
Definition: cexception.h:258
virtual int getSimulationStage() const
Definition: cexception.h:182
cStackCleanupException()
Definition: cexception.h:390
virtual int getContextComponentId() const
Definition: cexception.h:219
virtual void prependMessage(const char *txt)
Definition: cexception.h:148
Thrown when the simulation is completed without error.
Definition: cexception.h:239
virtual bool hasContext() const
Definition: cexception.h:199
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 cException * dup() const
Definition: cexception.h:130
virtual bool isError() const
Definition: cexception.h:157
Definition: cabstracthistogram.h:21
virtual cTerminationException * dup() const override
Definition: cexception.h:264
virtual cRuntimeError * dup() const override
Definition: cexception.h:332
virtual const char * what() const override
Definition: cexception.h:167
virtual cModule * getModuleToDelete() const
Definition: cexception.h:367
Exception class.
Definition: cexception.h:49
virtual eventnumber_t getEventNumber() const
Definition: cexception.h:187
virtual int getErrorCode() const
Definition: cexception.h:162
cDeleteModuleException(cModule *toDelete)
Definition: cexception.h:350
Used internally when deleting an activity() simple module.
Definition: cexception.h:384
virtual simtime_t getSimtime() const
Definition: cexception.h:192
Thrown from deleteModule() when the active activity() module is about to be deleted, in order to exit that module immediately.
Definition: cexception.h:341