Boost logo

Boost :

From: Ruben Perez (rubenperez038_at_[hidden])
Date: 2023-01-21 17:28:32


> I know Boost.MySql invented error_info to deal with this problem. I
> did not adopt it because
>
> * Deviates the completion signature from well established practice of
> having error_code as first parameter f(erro_code ec, ...) or
This is not true. error_info (now server_diagnostics) are never
part of the completion handler signature, but populated by lvalue reference.

> * Requires additional parameters to the completion e.g. f(error_code
> ec, error_info ei, ...)
Again, this is not true.

> * Raises question about who allocates the string.
The string is allocated as any other data passed by lvalue reference.

I'm not saying error_info (aka server_diagnostics) is the solution,
but none of these arguments are true.

> * The error information is also only useful for logging and the user
> can't react to it so why not log it right away.
I'm not getting this. How can I log something if I can't access it?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk