0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-05 14:06:27 -05:00

removed StrFormatInternalBug quote delimitation

This commit is contained in:
Reese Russell 2023-08-18 02:34:10 +00:00
parent 6ce5e8f475
commit 6e8f6468cb
3 changed files with 5 additions and 6 deletions

View file

@ -1141,10 +1141,9 @@ std::string RPCArg::ToString(const bool oneline) const
if (oneline && !m_opts.oneline_description.empty()) { 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)) { 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{ 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", STR_INTERNAL_BUG(strprintf("non-string RPC arg \"%s\" quotes oneline_description:\n%s",
m_names, m_opts.oneline_description, m_names, m_opts.oneline_description)
PACKAGE_NAME, FormatFullVersion(), )};
PACKAGE_BUGREPORT)};
} }
return m_opts.oneline_description; return m_opts.oneline_description;
} }

View file

@ -18,7 +18,7 @@
std::string StrFormatInternalBug(std::string_view msg, std::string_view file, int line, std::string_view func) 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" "%s %s\n"
"Please report this issue here: %s\n", "Please report this issue here: %s\n",
msg, file, line, func, PACKAGE_NAME, FormatFullVersion(), PACKAGE_BUGREPORT); msg, file, line, func, PACKAGE_NAME, FormatFullVersion(), PACKAGE_BUGREPORT);

View file

@ -27,7 +27,7 @@ class RpcMiscTest(BitcoinTestFramework):
self.log.info("test CHECK_NONFATAL") self.log.info("test CHECK_NONFATAL")
assert_raises_rpc_error( assert_raises_rpc_error(
-1, -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'), lambda: node.echo(arg9='trigger_internal_bug'),
) )