diff --git a/libs/libmysqlxx/src/String.cpp b/libs/libmysqlxx/src/String.cpp new file mode 100644 index 00000000000..c67427d1715 --- /dev/null +++ b/libs/libmysqlxx/src/String.cpp @@ -0,0 +1,22 @@ +#include +#include +#include +#include + + +void mysqlxx::String::throwException(const char * text) const +{ + std::stringstream info; + info << text; + + if (!isNull()) + { + info << ": "; + info.write(m_data, m_length); + } + + if (res && res->getQuery()) + info << ", query: " << res->getQuery()->str().substr(0, MYSQLXX_QUERY_PREVIEW_LENGTH); + + throw CannotParseValue(info.str()); +}