summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/include/error.h
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2018-07-23 15:53:49 +1000
committerLuke Chen <luke.chen@mongodb.com>2018-07-23 15:53:49 +1000
commite065e7daa99f75f19a73fc1b2b57a8947852a006 (patch)
treed2c141fab1e7334b6a552ecda525d29c1cbf20dd /src/third_party/wiredtiger/src/include/error.h
parent1c1535c9ee73ac4ed0d922855ccbe44335909082 (diff)
downloadmongo-e065e7daa99f75f19a73fc1b2b57a8947852a006.tar.gz
Import wiredtiger: 1be1b793becdfb5f4b2ae950449aa3710ca320ce from branch mongodb-4.2
ref: 3334609975..1be1b793be for: 4.1.2 WT-3276 Add recover=salvage to recover from a corrupted log file WT-3943 Include full error message when a python test asserts WT-3955 Add verbose option to log more messages on error returns WT-4160 Restore performance when timestamps are not in use WT-4168 Update upgrading documentation for 3.1.0 release WT-4169 Fix wt verify dump-pages failure WT-4171 Enabling tree walk timing stress causes excessive slowdown WT-4172 Add diagnostic hazard pointer checks in more places before freeing refs WT-4174 Do not access the lookaside file in rollback_to_stable when running with in_memory=true WT-4178 Fixes for wt_btree_immediately_durable needed for in-memory WT-4179 Expose WiredTiger crc32c functions WT-4182 Use conservative approach for log checksum errors WT-4188 Coverity: unchecked return value complaints
Diffstat (limited to 'src/third_party/wiredtiger/src/include/error.h')
-rw-r--r--src/third_party/wiredtiger/src/include/error.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/third_party/wiredtiger/src/include/error.h b/src/third_party/wiredtiger/src/include/error.h
index f94c3d7b880..c85f67e6f0b 100644
--- a/src/third_party/wiredtiger/src/include/error.h
+++ b/src/third_party/wiredtiger/src/include/error.h
@@ -19,6 +19,13 @@
#define WT_DIAGNOSTIC_YIELD
#endif
+#define __wt_err(session, error, ...) \
+ __wt_err_func(session, error, __func__, __LINE__, __VA_ARGS__)
+#define __wt_errx(session, ...) \
+ __wt_errx_func(session, __func__, __LINE__, __VA_ARGS__)
+#define __wt_set_return(session, error) \
+ __wt_set_return_func(session, __func__, __LINE__, error)
+
/* Set "ret" and branch-to-err-label tests. */
#define WT_ERR(a) do { \
if ((ret = (a)) != 0) \
@@ -125,8 +132,10 @@
*/
#ifdef HAVE_DIAGNOSTIC
#define WT_ASSERT(session, exp) do { \
- if (!(exp)) \
- __wt_assert(session, 0, __func__, __LINE__, "%s", #exp);\
+ if (!(exp)) { \
+ __wt_errx(session, "%s", #exp); \
+ __wt_abort(session); \
+ } \
} while (0)
#else
#define WT_ASSERT(session, exp) \