Utopia  2
Framework for studying models of complex & adaptive systems.
Public Member Functions | List of all members
Utopia::GotSignal Class Reference

An exception for when the program should end due to handling of a signal. More...

#include <exceptions.hh>

Inheritance diagram for Utopia::GotSignal:
Inheritance graph
[legend]
Collaboration diagram for Utopia::GotSignal:
Collaboration graph
[legend]

Public Member Functions

 GotSignal (const int signum)
 Construct a GotSignal exception, which has a standardized what message. More...
 
- Public Member Functions inherited from Utopia::Exception
 Exception (const std::string &what_arg, const int exit_code_arg=1)
 Construct an Utopia-specific exception. More...
 
 Exception (const char *what_arg, const int exit_code_arg=1)
 Construct an Utopia-specific exception. More...
 

Additional Inherited Members

- Public Attributes inherited from Utopia::Exception
const int exit_code
 The exit code to use when exiting due to this exception. More...
 

Detailed Description

An exception for when the program should end due to handling of a signal.

This exception can only be initialized with a signal number. From that, a standardized what-argument is generated and the exit code is calculated according to Unix convention as 128 + abs(signum)

Constructor & Destructor Documentation

◆ GotSignal()

Utopia::GotSignal::GotSignal ( const int  signum)
inline

Construct a GotSignal exception, which has a standardized what message.

The constructor takes the number of the signal that triggered this exception and computes an exit code from that according to Unix convention, i.e.: 128 + abs(signum)


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