From 5a194ab0378e1c8bbcb21d73a5c1ce8b8b85a83d Mon Sep 17 00:00:00 2001 From: kannibalox Date: Sun, 27 Oct 2024 16:22:16 -0400 Subject: [PATCH] Remove stack from exception message --- src/rpc/xmlrpc_tinyxml2.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/rpc/xmlrpc_tinyxml2.cc b/src/rpc/xmlrpc_tinyxml2.cc index 527ec843..e6f5b3eb 100644 --- a/src/rpc/xmlrpc_tinyxml2.cc +++ b/src/rpc/xmlrpc_tinyxml2.cc @@ -84,19 +84,16 @@ private: const tinyxml2::XMLElement* element_access(const tinyxml2::XMLElement* elem, std::string element_names) { // Helper function to check each step of a element access, in lieu of XPath - std::string stack; const tinyxml2::XMLElement* result = elem; size_t pos = 0; do { auto previous_pos = pos; pos = element_names.find(',', pos + 1); auto item = element_names.substr(pos, previous_pos - pos); - stack.append(item); result = result->FirstChildElement(item.c_str()); if (result == nullptr) { - throw xmlrpc_error(XMLRPC_PARSE_ERROR, "could not find expected element " + stack); + throw xmlrpc_error(XMLRPC_PARSE_ERROR, "could not find expected element " + item); } - stack.append("->"); } while (pos != std::string::npos); return result; }