MySQL Forums
Forum List  »  Connector/C++

Re: Microsoft C++ Exception std::out_of_range mysql-connector-c++-8.0.18-winx64
Posted by: Rand Olmsted
Date: November 25, 2019 10:49AM

Clarification of:
When attempting to read the database the standard library <map> throws std::out_of_range from "_NODISCARD mapped_type& at(const key_type& _Keyval)". _Keyval is 0.
The calling location is in reslut.h function "Value& get(col_count_t pos)". pos is 0. Line of code that throws: "return m_vals.at(pos);"
The exception is not fatal and the returned result (a pair of strings, one of which is a path to a file) works to open the file without error.

There are two calls per returned row, On first call _Keyval is 0, 1 on second call. Additionally, pos has the same value as _Keyval. For each row returnee there are two std::out_of_range exceptions.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.