File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1117,7 +1117,16 @@ std::string RPCArg::ToStringObj(const bool oneline) const
1117
1117
1118
1118
std::string RPCArg::ToString (const bool oneline) const
1119
1119
{
1120
- if (oneline && !m_opts.oneline_description .empty ()) return m_opts.oneline_description ;
1120
+ if (oneline && !m_opts.oneline_description .empty ()) {
1121
+ if (m_opts.oneline_description [0 ] == ' \" ' && m_type != Type::STR_HEX && m_type != Type::STR && gArgs .GetBoolArg (" -rpcdoccheck" , DEFAULT_RPC_DOC_CHECK)) {
1122
+ throw std::runtime_error{
1123
+ strprintf (" Internal bug detected: non-string RPC arg \" %s\" quotes oneline_description:\n %s\n %s %s\n Please report this issue here: %s\n " ,
1124
+ m_names, m_opts.oneline_description ,
1125
+ PACKAGE_NAME, FormatFullVersion (),
1126
+ PACKAGE_BUGREPORT)};
1127
+ }
1128
+ return m_opts.oneline_description ;
1129
+ }
1121
1130
1122
1131
switch (m_type) {
1123
1132
case Type::STR_HEX:
You can’t perform that action at this time.
0 commit comments