6 #ifndef __GU_EXCEPTION__
7 #define __GU_EXCEPTION__
23 Exception (
const std::string& msg_,
int err_)
30 const char* what ()
const throw() {
return msg.c_str(); }
32 int get_errno ()
const {
return err; }
34 void trace (
const char* file,
const char* func,
int line);
44 #define GU_TRACE(_exception_) _exception_.trace(__FILE__, __FUNCTION__, __LINE__)
48 #define gu_trace(_expr_) \
49 try { _expr_; } catch (gu::Exception& e) { GU_TRACE(e); throw; }
53 #define gu_trace(_expr_) _expr_
57 #endif // __GU_EXCEPTION__
Definition: gu_exception.hpp:19
Definition: gu_exception.hpp:17
Definition: gu_exception.hpp:16