Program exit functions and macros.
More...
#include <utility/exit.hh>
#include <utility/excn/Exceptions.hh>
#include <utility/backtrace.hh>
#include <utility/CSI_Sequence.hh>
#include <iostream>
#include <string>
#include <vector>
#include <sstream>
|
| utility |
| unresizable vector whose size is known at compile time, which may be allocated on the stack, and which indexes from 0.
|
|
|
void | utility::set_main_exit_callback (UtilityExitCallBack=nullptr) |
| Set call back funtion that will be called on utility::exit. Use this function to overload default behavior of sys.exit to more appropriate to your application Defaut value for callback function is nullptr, whicth mean no sys exit is called. More...
|
|
std::vector< UtilityExitCallBack > & | utility::get_all_exit_callbacks () |
| Array to hold all additional exit-callbacks. More...
|
|
void | utility::add_exit_callback (UtilityExitCallBack) |
| Add additional callback function that will be called before standard exit(…) is executed. [Note: do not confuse this function with 'set_main_exit_callback' which is replacing the end behavior of exit(…)]. More...
|
|
void | utility::remove_exit_callback (UtilityExitCallBack) |
| Remove additional callback function that was previously added by using add_exit_callback. More...
|
|
void | utility::exit_handler (char const *file, int const line, std::string const &message) |
|
void | utility::exit_with_user_fixable_issue (char const *file, int line, std::string const &message) |
| Exit in cases where there's a clear issue the user can fix. More...
|
|
void | utility::exit (char const *file, int const line, std::string const &message, int const) |
| Exit with file + line + message + optional status. More...
|
|
int | utility::cond_exit (bool condition, char const *file, int const line, std::string const &message, int const status) |
| Conditional Exit with file + line + message + optional status. More...
|
|