exception.h File Reference


Classes

class  Glib::Util::Exception
 Base exception class. More...

Namespaces

namespace  Glib
namespace  Glib::Util

Defines

#define GLIBMM_CATCH_AND_RETURN_NOX(a_value)
#define GLIBMM_CATCH_NOX
#define GLIBMM_TRY   try {
#define RETHROW_EXCEPTION(exception)   LOG_EXCEPTION ("Caught and rethrowing exception: " << exception.what() << "\n")
#define RETURN_IF_FAIL(expression)
#define RETURN_VAL_IF_FAIL(expression, value)
#define THROW(a_reason)
#define THROW_EMPTY
#define THROW_EXCEPTION(type, message)
#define THROW_IF_FAIL(a_cond)
#define THROW_IF_FAIL2(a_cond, a_reason)
#define THROW_IF_FAIL3(a_cond, type, a_reason)
#define TRACE_EXCEPTION(exception)   LOG_EXCEPTION ("Caught exception: " << exception.what () << "\n")

Define Documentation

#define GLIBMM_CATCH_AND_RETURN_NOX ( a_value   ) 

Value:

} catch (Glib::Exception &e) { \
    LOG_ERROR (e.what ()) ; \
    return a_value ; \
} catch (std::exception &e) { \
    LOG_ERROR (e.what ()) ; \
    return a_value ; \
} catch (...) { \
    LOG_ERROR ("An unknown error occured") ; \
    return a_value ; \
}

#define GLIBMM_CATCH_NOX

Value:

} catch (Glib::Exception &e) { \
    LOG_ERROR (e.what ()) ; \
} catch (std::exception &e) { \
    LOG_ERROR (e.what ()) ; \
} catch (...) { \
    LOG_ERROR ("An unknown error occured") ; \
}

#define GLIBMM_TRY   try {

#define RETHROW_EXCEPTION ( exception   )     LOG_EXCEPTION ("Caught and rethrowing exception: " << exception.what() << "\n")

#define RETURN_IF_FAIL ( expression   ) 

Value:

if (!(expression)) { \
LOG_ERROR ("Assertion " << #expression << " failed. Returning.\n") ; \
return ; \
}

#define RETURN_VAL_IF_FAIL ( expression,
value   ) 

Value:

if (!(expression)) { \
LOG_ERROR ("Assertion " << #expression << " failed. Returning " << #value << "\n") ; \
return value ; \
}

#define THROW ( a_reason   ) 

Value:

LOG_EXCEPTION ("Raised exception: "<< (Glib::ustring (a_reason)) << "\n"); \
throw Glib::Util::Exception (Glib::ustring (a_reason))  ;

#define THROW_EMPTY

Value:

LOG_EXCEPTION ("Raised empty exception" << endl) ; \
throw ;

#define THROW_EXCEPTION ( type,
message   ) 

Value:

LOG_EXCEPTION ("Raised " << #type << ": "<< message<< "\n") ; \
throw type (message) ;

#define THROW_IF_FAIL ( a_cond   ) 

Value:

if (!(a_cond)) { \
LOG_EXCEPTION ("Condition (" << #a_cond << ") failed; raising exception\n" ) ;\
throw Glib::Util::Exception                                                 \
    (Glib::ustring ("Assertion failed: ") + #a_cond)  ;\
}

#define THROW_IF_FAIL2 ( a_cond,
a_reason   ) 

Value:

if (!(a_cond)) { \
LOG_EXCEPTION ("Condition (" << #a_cond << ") failed; raising exception " << a_reason <<"\n");\
throw Glib::Util::Exception (a_reason)  ;\
}

#define THROW_IF_FAIL3 ( a_cond,
type,
a_reason   ) 

Value:

if (!(a_cond)) { \
LOG_EXCEPTION ("Condition (" << #a_cond << ") failed; raising exception " << #type << \
<< ":  " << a_reason << "\n" ) ; throw type (a_reason)  ;\
}

#define TRACE_EXCEPTION ( exception   )     LOG_EXCEPTION ("Caught exception: " << exception.what () << "\n")


Generated on Wed Aug 26 20:50:37 2009 for gtkmm-utils by  doxygen 1.5.8