From 6e8f6468cbf1320b70cf01333002a31b44cb7c33 Mon Sep 17 00:00:00 2001 From: Reese Russell Date: Fri, 18 Aug 2023 02:34:10 +0000 Subject: [PATCH] removed StrFormatInternalBug quote delimitation --- src/rpc/util.cpp | 7 +++---- src/util/check.cpp | 2 +- test/functional/rpc_misc.py | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/rpc/util.cpp b/src/rpc/util.cpp index 08a778a60e8..5029c6dd1c4 100644 --- a/src/rpc/util.cpp +++ b/src/rpc/util.cpp @@ -1141,10 +1141,9 @@ std::string RPCArg::ToString(const bool oneline) const if (oneline && !m_opts.oneline_description.empty()) { if (m_opts.oneline_description[0] == '\"' && m_type != Type::STR_HEX && m_type != Type::STR && gArgs.GetBoolArg("-rpcdoccheck", DEFAULT_RPC_DOC_CHECK)) { throw std::runtime_error{ - strprintf("Internal bug detected: non-string RPC arg \"%s\" quotes oneline_description:\n%s\n%s %s\nPlease report this issue here: %s\n", - m_names, m_opts.oneline_description, - PACKAGE_NAME, FormatFullVersion(), - PACKAGE_BUGREPORT)}; + STR_INTERNAL_BUG(strprintf("non-string RPC arg \"%s\" quotes oneline_description:\n%s", + m_names, m_opts.oneline_description) + )}; } return m_opts.oneline_description; } diff --git a/src/util/check.cpp b/src/util/check.cpp index 795dce71248..c4d4b0cc28f 100644 --- a/src/util/check.cpp +++ b/src/util/check.cpp @@ -18,7 +18,7 @@ std::string StrFormatInternalBug(std::string_view msg, std::string_view file, int line, std::string_view func) { - return strprintf("Internal bug detected: \"%s\"\n%s:%d (%s)\n" + return strprintf("Internal bug detected: %s\n%s:%d (%s)\n" "%s %s\n" "Please report this issue here: %s\n", msg, file, line, func, PACKAGE_NAME, FormatFullVersion(), PACKAGE_BUGREPORT); diff --git a/test/functional/rpc_misc.py b/test/functional/rpc_misc.py index 43d1e2c7315..20485c01d35 100755 --- a/test/functional/rpc_misc.py +++ b/test/functional/rpc_misc.py @@ -27,7 +27,7 @@ class RpcMiscTest(BitcoinTestFramework): self.log.info("test CHECK_NONFATAL") assert_raises_rpc_error( -1, - 'Internal bug detected: "request.params[9].get_str() != "trigger_internal_bug""', + 'Internal bug detected: request.params[9].get_str() != "trigger_internal_bug"', lambda: node.echo(arg9='trigger_internal_bug'), )