Commit 1a930bbc authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Give xxxasserts their own backend with a different message.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@912 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent ade05c3a
......@@ -40,10 +40,11 @@ do { \
#define xxxassert(e) \
do { \
if (!(e)) \
lbv_assert("XXX:" __func__, __FILE__, __LINE__, #e, errno); \
lbv_xxxassert(__func__, __FILE__, __LINE__, #e, errno); \
} while (0)
void lbv_assert(const char *, const char *, int, const char *, int);
void lbv_xxxassert(const char *, const char *, int, const char *, int);
/* Assert zero return value */
#define AZ(foo) do { assert((foo) == 0); } while (0)
......
......@@ -9,6 +9,17 @@
#include "libvarnish.h"
void
lbv_xxxassert(const char *func, const char *file, int line, const char *cond, int err)
{
fprintf(stderr,
"Missing errorhandling code in %s(), %s line %d:\n"
" Condition(%s) not true.\n"
" errno = %d (%s)\n", func, file, line, cond, err, strerror(err));
abort();
}
void
lbv_assert(const char *func, const char *file, int line, const char *cond, int err)
{
......
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