diff options
author | David Hows <david.hows@mongodb.com> | 2016-06-24 17:05:13 +1000 |
---|---|---|
committer | David Hows <david.hows@mongodb.com> | 2016-06-24 17:05:13 +1000 |
commit | d8fb874fc40989cb9675e56ca80b3b64e6fa2ee3 (patch) | |
tree | 6f03ed5cde97aedc762215c14d23ee5305998a2b /src/support/err.c | |
parent | fb1663e6fc800be97c0ddc697b6f939dc610e08e (diff) | |
parent | 1f4aaa4490a82cf947afdabbb9214ee5b1850d13 (diff) | |
download | mongodb-3.3.9.tar.gz |
Merge branch 'develop' of github.com:wiredtiger/wiredtiger into mongodb-3.4mongodb-3.3.9mongodb-3.3.10mongodb-3.0.1
Diffstat (limited to 'src/support/err.c')
-rw-r--r-- | src/support/err.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/support/err.c b/src/support/err.c index 815b79c16db..93c0af37328 100644 --- a/src/support/err.c +++ b/src/support/err.c @@ -469,6 +469,9 @@ void __wt_assert(WT_SESSION_IMPL *session, int error, const char *file_name, int line_number, const char *fmt, ...) WT_GCC_FUNC_ATTRIBUTE((format (printf, 5, 6))) +#ifdef HAVE_DIAGNOSTIC + WT_GCC_FUNC_ATTRIBUTE((noreturn)) +#endif { va_list ap; @@ -493,7 +496,10 @@ __wt_panic(WT_SESSION_IMPL *session) F_SET(S2C(session), WT_CONN_PANIC); __wt_err(session, WT_PANIC, "the process must exit and restart"); -#if !defined(HAVE_DIAGNOSTIC) +#if defined(HAVE_DIAGNOSTIC) + __wt_abort(session); /* Drop core if testing. */ + /* NOTREACHED */ +#else /* * Chaos reigns within. * Reflect, repent, and reboot. @@ -501,9 +507,6 @@ __wt_panic(WT_SESSION_IMPL *session) */ return (WT_PANIC); #endif - - __wt_abort(session); /* Drop core if testing. */ - /* NOTREACHED */ } /* @@ -517,12 +520,12 @@ __wt_illegal_value(WT_SESSION_IMPL *session, const char *name) name == NULL ? "" : name, name == NULL ? "" : ": ", "encountered an illegal file format or internal value"); -#if !defined(HAVE_DIAGNOSTIC) - return (__wt_panic(session)); -#endif - +#if defined(HAVE_DIAGNOSTIC) __wt_abort(session); /* Drop core if testing. */ /* NOTREACHED */ +#else + return (__wt_panic(session)); +#endif } /* |