mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-14 10:13:05 +02:00
Add ASSERT_MSG().
Used when execution reaches an invalid location rather than an invalid condition.
This commit is contained in:
parent
f6c3262861
commit
a1f4fd32a1
@ -31,9 +31,14 @@ Asserts are used in test code to ensure that certain conditions are true. They
|
|||||||
#else
|
#else
|
||||||
#define ASSERT_INLINE(condition)
|
#define ASSERT_INLINE(condition)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Used when execution reaches an invalid location rather than an invalid condition
|
||||||
|
#define ASSERT_MSG(message) \
|
||||||
|
THROW_FMT(AssertError, message);
|
||||||
#else
|
#else
|
||||||
#define ASSERT(condition)
|
#define ASSERT(condition)
|
||||||
#define ASSERT_INLINE(condition)
|
#define ASSERT_INLINE(condition)
|
||||||
|
#define ASSERT_MSG(message)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/***********************************************************************************************************************************
|
/***********************************************************************************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user