boostorg / mysql

MySQL C++ client based on Boost.Asio
https://www.boost.org/doc/libs/master/libs/mysql
Boost Software License 1.0
252 stars 32 forks source link

Completion token to include diagnostics in exceptions #329

Closed anarthal closed 1 month ago

anarthal commented 1 month ago

The current use of throw_on_error is verbose and error-prone. With careful design, we can craft a with_diagnostics completion token that grabs the diagnostics* argument from the initiation args and makes the function throw the adequate exception type.