-
Type:
Improvement
-
Resolution: Done
-
Priority:
Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
None
alexander.gorrod, david.hows, we have a lot of simple error handling code in the test programs, and it looks like we're adding new test programs at a fast rate.
What would you think about a general-purpose macro that makes simple error handling in the test programs easier?
Something like this:
/*
* check --
* Complain and quit if a function call fails.
*/
#define check(call) do { \
int __r; \
if ((__r = (call)) != 0) \
die(__r, "%s/%d: %s", __func__, __LINE__, #call); \
} while (0)
I'll push a branch to show you what it ends up looking like, using format as an example.
- is depended on by
-
SERVER-22804 WiredTiger changes for MongoDB 3.3.3
-
- Closed
-
- links to