OMNeT++ Simulation Library
6.0.3
|
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 std::string& msg);
87 void exitIfStartupError();
102 _OPP_GNU_ATTRIBUTE(format(printf, 2, 3))
119 _OPP_GNU_ATTRIBUTE(format(printf, 3, 4))
150 virtual void prependMessage(
const char *txt) {msg = std::string(txt) +
": " + msg;}
169 virtual const char *
what()
const throw()
override {
return msg.c_str();}
176 virtual std::string getFormattedMessage()
const;
254 _OPP_GNU_ATTRIBUTE(format(printf, 2, 3))
273 virtual bool isError()
const override {
return false;}
290 bool displayed =
false;
307 _OPP_GNU_ATTRIBUTE(format(printf, 2, 3))
324 _OPP_GNU_ATTRIBUTE(format(printf, 3, 4))
330 cRuntimeError(
const std::exception& e,
const char *location);
382 virtual bool isError()
const override {
return false;}
417 virtual bool isError()
const override {
return false;}
virtual void prependMessage(const char *txt)
Definition: cexception.h:150
Exception class.
Definition: cexception.h:49
This class represents modules in the simulation.
Definition: cmodule.h:48
virtual bool hasContext() const
Definition: cexception.h:201
virtual simtime_t getSimtime() const
Definition: cexception.h:194
virtual bool isError() const override
Definition: cexception.h:382
cObject is a lightweight class which serves as the root of the OMNeT++ class hierarchy....
Definition: cobject.h:92
virtual bool isError() const
Definition: cexception.h:159
cRuntimeError(const cRuntimeError &e)
Definition: cexception.h:336
virtual cModule * getModuleToDelete() const
Definition: cexception.h:377
virtual int getContextComponentId() const
Definition: cexception.h:221
virtual void setMessage(const char *txt)
Definition: cexception.h:145
virtual int getContextComponentKind() const
Definition: cexception.h:227
virtual cRuntimeError * dup() const override
Definition: cexception.h:342
int64_t-based, base-10 fixed-point simulation time.
Definition: simtime.h:66
Thrown when the simulation is completed without error.
Definition: cexception.h:241
Used internally when deleting an activity() simple module.
Definition: cexception.h:394
cStackCleanupException()
Definition: cexception.h:400
Thrown from deleteModule() when the active activity() module is about to be deleted,...
Definition: cexception.h:351
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 cStackCleanupException * dup() const override
Definition: cexception.h:412
virtual const char * getContextClassName() const
Definition: cexception.h:207
virtual ~cException()
Definition: cexception.h:137
virtual cTerminationException * dup() const override
Definition: cexception.h:267
virtual eventnumber_t getEventNumber() const
Definition: cexception.h:189
virtual bool isError() const override
Definition: cexception.h:273
virtual int getErrorCode() const
Definition: cexception.h:164
virtual cDeleteModuleException * dup() const override
Definition: cexception.h:372
virtual const char * getContextFullPath() const
Definition: cexception.h:213
virtual bool isError() const override
Definition: cexception.h:417
virtual cException * dup() const
Definition: cexception.h:132
Thrown when the simulation kernel or other components detect a runtime error.
Definition: cexception.h:286
virtual const char * what() const override
Definition: cexception.h:169
cDeleteModuleException(cModule *toDelete)
Definition: cexception.h:360
virtual int getSimulationStage() const
Definition: cexception.h:184