Rosetta 3.3
Classes | Namespaces | Functions | Variables
src/utility/exit.cc File Reference

Program exit functions and macros. More...

#include <utility/exit.hh>
#include <utility/excn/EXCN_Base.hh>
#include <cassert>
#include <cstdlib>
#include <iostream>

Classes

class  utility::EXCN_utility_exit

Namespaces

namespace  utility
 

unresizable vector whose size is known at compile time, which may be allocated on the stack, and which indexes from 1.


Functions

void utility::set_exit_callback (void(*my_callback)(void)=0)
 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 0, whicth mean no sys exit is called.
void utility::exit (std::string const &file, int const line, std::string const &message, int const status)
 Exit with file + line + message + optional status.
int utility::cond_exit (bool condition, std::string const &file, int const line, std::string const &message, int const status)
 Conditional Exit with file + line + message + optional status.

Variables

static void(* utility::exit_callback )(void)=0

Detailed Description

Program exit functions and macros.

Author:
David Kim (dekim@u.washington.edu)
Stuart G. Mentzer (Stuart_Mentzer@objexx.com)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines