1 #ifndef _GLUCAT_TRY_CATCH_H 2 #define _GLUCAT_TRY_CATCH_H 55 {
e.print_error_msg(); }
56 catch (
const std::bad_alloc&
e)
57 { std::cerr <<
"bad_alloc" << std::endl; }
59 { std::cerr <<
"unexpected exception" << std::endl; }
68 { result = (*f)(arg); }
70 {
e.print_error_msg(); }
71 catch (
const std::bad_alloc&
e)
72 { std::cerr <<
"bad_alloc" << std::endl; }
74 { std::cerr <<
"unexpected exception" << std::endl; }
78 #endif // _GLUCAT_TRY_CATCH_H int(* intintfn)(int)
For exception catching: pointer to function of int returning int.
int(* intfn)()
For exception catching: pointer to function returning int.
Abstract exception class.
int try_catch(intfn f)
Exception catching for functions returning int.