Commit 5dd59b75 authored by Niels Möller's avatar Niels Möller
Browse files

* src/exception.h (EXCEPTION_RAISE): Better tracing.

Rev: src/exception.c:1.11
Rev: src/exception.h:1.13
parent d9ef32bc
......@@ -162,10 +162,13 @@ make_protocol_exception(UINT32 reason, const char *msg)
return &self->super;
}
#if DEBUG_TRACE
void exception_raise(struct exception_handler *h,
const struct exception *e)
const struct exception *e,
const char *context)
{
trace ("Raising exception %z (type %i), using handler installed by %z\n",
e->msg, e->type, h->context);
trace ("%z: Raising exception %z (type %i), using handler installed by %z\n",
context, e->msg, e->type, h->context);
h->raise(h, e);
}
#endif /* DEBUG_TRACE */
......@@ -53,10 +53,11 @@
*/
void exception_raise(struct exception_handler *e,
const struct exception *h);
const struct exception *h,
const char *context);
#if DEBUG_TRACE
# define EXCEPTION_RAISE exception_raise
# define EXCEPTION_RAISE(h, e) exception_raise((h), (e), HANDLER_CONTEXT)
#else /* !DEBUG_TRACE */
# define EXCEPTION_RAISE(h, e) ((h)->raise((h), (e)))
#endif /* !DEBUG_TRACE */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment