mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
util/check: stop using lambda for Assert/Assume
This commit is contained in:
14
src/util/check.cpp
Normal file
14
src/util/check.cpp
Normal file
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user