We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ba8c4e commit 661d3c1Copy full SHA for 661d3c1
1 file changed
OREData/ored/utilities/xmlutils.cpp
@@ -28,6 +28,7 @@
28
29
#include <boost/lexical_cast.hpp>
30
#include <boost/algorithm/string/join.hpp>
31
+#include <boost/algorithm/string/erase.hpp>
32
33
// we only want to include these here.
34
#if defined(__clang__)
@@ -62,9 +63,10 @@ namespace {
62
63
// handle rapid xml parser errors
64
65
void handle_rapidxml_parse_error(const rapidxml::parse_error& e) {
- // limit to first 30 chars.
66
- string where(e.where<char>(), std::min<std::size_t>(strlen(e.where<char>()), 30));
67
- QL_FAIL("RapidXML Parse Error : " << e.what() << ". where=" << where);
+ string where = e.where<char>();
+ boost::erase_all(where, "\n");
68
+ boost::erase_all(where, "\r");
69
+ QL_FAIL("RapidXML Parse Error (" << e.what() << ") at '" << where.substr(0, 400) << "'");
70
}
71
72
0 commit comments