Skip to content

Commit 6e8f646

Browse files
committed
removed StrFormatInternalBug quote delimitation
1 parent 6ce5e8f commit 6e8f646

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/rpc/util.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,10 +1141,9 @@ std::string RPCArg::ToString(const bool oneline) const
11411141
if (oneline && !m_opts.oneline_description.empty()) {
11421142
if (m_opts.oneline_description[0] == '\"' && m_type != Type::STR_HEX && m_type != Type::STR && gArgs.GetBoolArg("-rpcdoccheck", DEFAULT_RPC_DOC_CHECK)) {
11431143
throw std::runtime_error{
1144-
strprintf("Internal bug detected: non-string RPC arg \"%s\" quotes oneline_description:\n%s\n%s %s\nPlease report this issue here: %s\n",
1145-
m_names, m_opts.oneline_description,
1146-
PACKAGE_NAME, FormatFullVersion(),
1147-
PACKAGE_BUGREPORT)};
1144+
STR_INTERNAL_BUG(strprintf("non-string RPC arg \"%s\" quotes oneline_description:\n%s",
1145+
m_names, m_opts.oneline_description)
1146+
)};
11481147
}
11491148
return m_opts.oneline_description;
11501149
}

src/util/check.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
std::string StrFormatInternalBug(std::string_view msg, std::string_view file, int line, std::string_view func)
2020
{
21-
return strprintf("Internal bug detected: \"%s\"\n%s:%d (%s)\n"
21+
return strprintf("Internal bug detected: %s\n%s:%d (%s)\n"
2222
"%s %s\n"
2323
"Please report this issue here: %s\n",
2424
msg, file, line, func, PACKAGE_NAME, FormatFullVersion(), PACKAGE_BUGREPORT);

test/functional/rpc_misc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def run_test(self):
2727
self.log.info("test CHECK_NONFATAL")
2828
assert_raises_rpc_error(
2929
-1,
30-
'Internal bug detected: "request.params[9].get_str() != "trigger_internal_bug""',
30+
'Internal bug detected: request.params[9].get_str() != "trigger_internal_bug"',
3131
lambda: node.echo(arg9='trigger_internal_bug'),
3232
)
3333

0 commit comments

Comments
 (0)