Botan
2.1.0
Crypto and TLS for C++11
Main Page
Namespaces
Classes
Files
File List
File Members
src
lib
utils
assert.cpp
Go to the documentation of this file.
1
/*
2
* Runtime assertion checking
3
* (C) 2010,2012 Jack Lloyd
4
*
5
* Botan is released under the Simplified BSD License (see license.txt)
6
*/
7
8
#include <botan/exceptn.h>
9
#include <sstream>
10
11
namespace
Botan
{
12
13
void
assertion_failure
(
const
char
* expr_str,
14
const
char
* assertion_made,
15
const
char
* func,
16
const
char
* file,
17
int
line)
18
{
19
std::ostringstream format;
20
21
format <<
"False assertion "
;
22
23
if
(assertion_made && assertion_made[0] != 0)
24
format <<
"'"
<< assertion_made <<
"' (expression "
<< expr_str <<
") "
;
25
else
26
format << expr_str <<
" "
;
27
28
if
(func)
29
format <<
"in "
<< func <<
" "
;
30
31
format <<
"@"
<< file <<
":"
<< line;
32
33
throw
Exception
(format.str());
34
}
35
36
}
Botan::assertion_failure
void assertion_failure(const char *expr_str, const char *assertion_made, const char *func, const char *file, int line)
Definition:
assert.cpp:13
Botan::Exception
Definition:
exceptn.h:21
Botan
Definition:
alg_id.cpp:13
Generated on Fri Aug 4 2017 19:29:39 for Botan by
1.8.9.1