OMNeT++ Simulation Library  6.0.3
cTerminationException Class Reference

#include <cexception.h>

Description

Thrown when the simulation is completed without error.

For example, cSimpleModule::endSimulation() throws this exception. Statistical result collection objects may also throw this exception to signal that the accuracy of simulation results has reached the desired level.

Inheritance diagram for cTerminationException:
cException

Public Member Functions

 cTerminationException (ErrorCodeInt errcode,...)
 
 cTerminationException (const char *msg,...)
 
 cTerminationException (const cTerminationException &e)=default
 
virtual cTerminationExceptiondup () const override
 
virtual bool isError () const override
 
- Public Member Functions inherited from cException
 cException (ErrorCodeInt errcode,...)
 
 cException (const char *msg,...)
 
 cException (const cObject *where, ErrorCodeInt errcode,...)
 
 cException (const cObject *where, const char *msg,...)
 
 cException (const cException &)=default
 
virtual ~cException () throw ()
 
virtual void setMessage (const char *txt)
 
virtual void prependMessage (const char *txt)
 
virtual int getErrorCode () const
 
virtual const char * what () const override throw ()
 
virtual std::string getFormattedMessage () const
 
virtual int getSimulationStage () const
 
virtual eventnumber_t getEventNumber () const
 
virtual simtime_t getSimtime () const
 
virtual bool hasContext () const
 
virtual const char * getContextClassName () const
 
virtual const char * getContextFullPath () const
 
virtual int getContextComponentId () const
 
virtual int getContextComponentKind () const
 

Additional Inherited Members

- Protected Member Functions inherited from cException
void init (const cObject *obj, ErrorCode errorcode, const std::string &msg)
 

Constructor & Destructor Documentation

◆ cTerminationException() [1/3]

cTerminationException ( ErrorCodeInt  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.

◆ cTerminationException() [2/3]

cTerminationException ( const char *  msg,
  ... 
)

To be called like printf(). The error code is set to E_CUSTOM.

◆ cTerminationException() [3/3]

Copy constructor. We unfortunately need to copy exception objects when handing them back from an activity() method.

Member Function Documentation

◆ dup()

virtual cTerminationException* dup ( ) const
inlineoverridevirtual

Creates and returns an exact copy of this object. We unfortunately need to copy exception objects when handing them back from an activity() method.

Reimplemented from cException.

◆ isError()

virtual bool isError ( ) const
inlineoverridevirtual

Termination exceptions are generally not errors, but messages like "Simulation completed".

Reimplemented from cException.


The documentation for this class was generated from the following file: