Closed klemens-morgenstern closed 2 weeks ago
This has been an absolute pain in Boost.MySQL, where getting error information provided by the server is really important for users. We created extra overloads for such information, but interoperability with Asio suffers. This PR would really address this need.
Added as disposition in ecaa507b1b56484554ebc0cbcd300a483cf9a2e9.
Thanks Chris!
If the error type must be nothrow copy constructible, this is not a solution to neither Boost.MySQL nor Boost.Redis problems, as these use std::string for additional info.
Can we relax the restrictions and use is_nothrow_move_constructible?
Other errors may be used by libraries (e.g. mysql or redis) to add more refined information. Supporting turning those into exceptions by default is however a requirement if library authors want a
void(my_error, ...)
completion signature.