Utopia  2
Framework for studying models of complex & adaptive systems.
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. More...
 
 Exception (const char *what_arg, const int exit_code_arg=1)
 Construct an Utopia-specific exception. More...
 

Public Attributes

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

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.

◆ 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.

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: