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
11171117
11181118std::string RPCArg::ToString (const bool oneline) const
11191119{
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+ }
11211130
11221131 switch (m_type) {
11231132 case Type::STR_HEX:
You can’t perform that action at this time.
0 commit comments