gramods
Public Member Functions | Public Attributes | List of all members
gramods::gmCore::ExitException Struct Reference

Standard exception for exiting the application with a specified exit code. More...

#include <ExitException.hh>

Collaboration diagram for gramods::gmCore::ExitException:
Collaboration graph
[legend]

Public Member Functions

 ExitException (int exit_code=0)
 Creates an exit exception with the specified exit code, or an exit code of 0 (zero) if not specified. More...
 

Public Attributes

const int exit_code
 The exit code of the exit exception. More...
 

Detailed Description

Standard exception for exiting the application with a specified exit code.

Top level execution of gramods objects should catch this exception and exit the application with the given exit code.

Exiting the application is an exception because normally the application should be running. It is not always practical to handle exiting as a normal, non-exceptional behavior.

Constructor & Destructor Documentation

◆ ExitException()

gramods::gmCore::ExitException::ExitException ( int  exit_code = 0)
inline

Creates an exit exception with the specified exit code, or an exit code of 0 (zero) if not specified.

Member Data Documentation

◆ exit_code

const int gramods::gmCore::ExitException::exit_code

The exit code of the exit exception.


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