mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +01:00
util: Move error message formatting of NonFatalCheckError to cpp
This allows to strip down the header file
This commit is contained in:
@@ -4,8 +4,23 @@
|
||||
|
||||
#include <util/check.h>
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config/bitcoin-config.h>
|
||||
#endif
|
||||
|
||||
#include <tinyformat.h>
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <string>
|
||||
|
||||
|
||||
NonFatalCheckError::NonFatalCheckError(const char* msg, const char* file, int line, const char* func)
|
||||
: std::runtime_error{
|
||||
strprintf("Internal bug detected: \"%s\"\n%s:%d (%s)\nPlease report this issue here: %s\n", msg, file, line, func, PACKAGE_BUGREPORT)}
|
||||
{
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user