]> granicus.if.org Git - postgresql/commit
Improve Assert output
authorPeter Eisentraut <peter@eisentraut.org>
Sat, 17 Aug 2019 10:36:30 +0000 (12:36 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Sat, 17 Aug 2019 10:50:50 +0000 (12:50 +0200)
commitd78d452bc5ac46a970e4fca2b31f3d533815c39a
treeb84beeae3b33cd5ead89f6023dcb5f322118b91e
parentf7db0ac7d5b6ba9728616a1cc36288cb4f817e66
Improve Assert output

If an assertion expression contained a macro, the failed assertion
message would print the expanded macro, which is usually unhelpful and
confusing.  Restructure the Assert macros to not expand any macros
when constructing the failure message.

This also fixes that the existing output for Assert et al. shows
the *inverted* condition, which is also confusing and not how
assertions usually work.

Discussion: https://www.postgresql.org/message-id/flat/6c68efe3-117a-dcc1-73d4-18ba1ec532e2%402ndquadrant.com
src/include/c.h