diff options
| author | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2025-02-18 17:02:53 -0300 |
|---|---|---|
| committer | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2025-02-18 17:02:53 -0300 |
| commit | 959575a5ca598bf5f37fb5cebe7ed1d80d3d71f7 (patch) | |
| tree | acc8d60aedb12b70048e676e8a7349deb0010db8 /src/mongo/util/assert_util.h | |
| parent | 76588293975fc059cf076779e4283e6ffaf8afff (diff) | |
New upstream version 6.0.20upstream
Diffstat (limited to 'src/mongo/util/assert_util.h')
| -rw-r--r-- | src/mongo/util/assert_util.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mongo/util/assert_util.h b/src/mongo/util/assert_util.h index d423fa3454f..d03605e6192 100644 --- a/src/mongo/util/assert_util.h +++ b/src/mongo/util/assert_util.h @@ -702,6 +702,19 @@ Status exceptionToStatus() noexcept; #define MONGO_UNREACHABLE_TASSERT(msgid) tasserted(msgid, "Hit a MONGO_UNREACHABLE_TASSERT!") /** + * Produces an invariant failure if executed. Subset of MONGO_UNREACHABLE, but specifically + * to indicate that the program has reached a function that is unimplemented and should be + * unreachable from production. + * Example: + * + * void myFuncToDo() { + * MONGO_UNIMPLEMENTED; + * } + */ +#define MONGO_UNIMPLEMENTED \ + ::mongo::invariantFailed("Hit a MONGO_UNIMPLEMENTED!", __FILE__, __LINE__); + +/** * Like `MONGO_UNIMPLEMENTED`, but triggers a `tassert` instead of an `invariant` */ #define MONGO_UNIMPLEMENTED_TASSERT(msgid) tasserted(msgid, "Hit a MONGO_UNIMPLEMENTED_TASSERT!") |
