Commit 145cc395 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Dump errno and strerror in assert


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@406 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent ad23f893
......@@ -172,3 +172,16 @@ VSL_MgtInit(const char *fn, unsigned size)
memset(VSL_stats, 0, sizeof *VSL_stats);
}
/*--------------------------------------------------------------------*/
void
__assert(const char *func, const char *file, int line, const char *failedexpr)
{
(void)fprintf(stderr,
"\r\nAssertion failed: (%s)\n"
" function %s, file %s, line %d.\n"
" errno %d = \"%s\"\n",
failedexpr, func, file, line, errno, strerror(errno));
abort();
/* NOTREACHED */
}
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