aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/assert.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-07-09 16:43:21 +0000
committerlloyd <[email protected]>2012-07-09 16:43:21 +0000
commita73ace1185febb9a9dfa9e6ba93c883beedbd938 (patch)
tree73170167ab016e9af2346921aa9da2afd5ed25b2 /src/utils/assert.cpp
parent4e43080954be57e362feb1cc8202bfd42117e286 (diff)
The messages for assertion checks were done both ways, both "assertion
X is true" and "assertion X is false". Convert all of them to the form "assertion X is true" thus making it clear what it is that we are attempting to assert by testing the expression provided.
Diffstat (limited to 'src/utils/assert.cpp')
-rw-r--r--src/utils/assert.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/utils/assert.cpp b/src/utils/assert.cpp
index 4b69b4420..91356f15b 100644
--- a/src/utils/assert.cpp
+++ b/src/utils/assert.cpp
@@ -1,6 +1,6 @@
/*
* Runtime assertion checking
-* (C) 2010 Jack Lloyd
+* (C) 2010,2012 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
@@ -19,10 +19,12 @@ void assertion_failure(const char* expr_str,
{
std::ostringstream format;
- format << "Assertion " << expr_str << " failed ";
+ format << "False assertion ";
if(assertion_made && assertion_made[0] != 0)
- format << "(" << assertion_made << ") ";
+ format << "'" << assertion_made << "' (expression " << expr_str << ") ";
+ else
+ format << expr_str << " ";
if(func)
format << "in " << func << " ";