Utopia 2
Framework for studying models of complex & adaptive systems.
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Utopia::Exception Class Reference

The base exception class to derive Utopia-specific exceptions from. More...

#include <exceptions.hh>

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

Public Member Functions

 Exception (const std::string &what_arg, const int exit_code_arg=1)
 Construct an Utopia-specific exception.
 
 Exception (const char *what_arg, const int exit_code_arg=1)
 Construct an Utopia-specific exception.
 

Public Attributes

const int exit_code
 The exit code to use when exiting due to this exception.
 

Detailed Description

The base exception class to derive Utopia-specific exceptions from.

Constructor & Destructor Documentation

◆ Exception() [1/2]

Utopia::Exception::Exception ( const std::string &  what_arg,
const int  exit_code_arg = 1 
)
inlineexplicit

Construct an Utopia-specific exception.

Parameters
what_argThe std::runtime_error what argument
exit_codeThe code that can (and should) be used in case this exceptions leads to exiting of the program. It is accessible via the exit_code member.
27 :
28 std::runtime_error(what_arg),
30 {};
const int exit_code
The exit code to use when exiting due to this exception.
Definition exceptions.hh:18
Container select_entities(const Manager &mngr, const DataIO::Config &sel_cfg)
Select entities according to parameters specified in a configuration.
Definition select.hh:213

◆ Exception() [2/2]

Utopia::Exception::Exception ( const char what_arg,
const int  exit_code_arg = 1 
)
inlineexplicit

Construct an Utopia-specific exception.

Parameters
what_argThe std::runtime_error what argument
exit_codeThe code that can (and should) be used in case this exceptions leads to exiting of the program. It is accessible via the exit_code member.
39 :
40 std::runtime_error(what_arg),
42 {};

Member Data Documentation

◆ exit_code

const int Utopia::Exception::exit_code

The exit code to use when exiting due to this exception.


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