diff options
author | Anthony Towns <aj@erisian.com.au> | 2022-03-26 12:41:28 +1000 |
---|---|---|
committer | Anthony Towns <aj@erisian.com.au> | 2022-03-30 23:09:13 +1000 |
commit | 2ef47ba6c57a12840499a13908ab61aefca6cb55 (patch) | |
tree | 8fa4af2c41a838756e8dffa5d3587c0ef414faf5 /src/util/check.cpp | |
parent | 7c9fe25c16d48b53a61fa2f6ff77eaf8820cb1f6 (diff) | |
download | bitcoin-2ef47ba6c57a12840499a13908ab61aefca6cb55.tar.xz |
util/check: stop using lambda for Assert/Assume
Diffstat (limited to 'src/util/check.cpp')
-rw-r--r-- | src/util/check.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/util/check.cpp b/src/util/check.cpp new file mode 100644 index 0000000000..2a9f885560 --- /dev/null +++ b/src/util/check.cpp @@ -0,0 +1,14 @@ +// Copyright (c) 2022 The Bitcoin Core developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include <util/check.h> + +#include <tinyformat.h> + +void assertion_fail(const char* file, int line, const char* func, const char* assertion) +{ + auto str = strprintf("%s:%s %s: Assertion `%s' failed.\n", file, line, func, assertion); + fwrite(str.data(), 1, str.size(), stderr); + std::abort(); +} |