|
Boost Users : |
Subject: Re: [Boost-users] [boost::system] Is the library abstraction general enough?
From: Lian Cheng (rhythm.mail_at_[hidden])
Date: 2009-02-23 05:33:09
Boris Schaeling:
> On Fri, 20 Feb 2009 09:36:53 +0100, Lian Cheng <rhythm.mail_at_[hidden]>
> wrote:
>
> Isn't there a list of error numbers and error strings MySQL uses? I ask
> as calling error_category::message() should also return an error string
> even if no MySQL connection is used?
Unfortunately, no. As I've mentioned, the error strings MySQL uses are
printf format strings, such as:
Using unsupported buffer type: %d (parameter: %d)
And you always need an active MySQL connection handle to obtain the full
error message by calling mysql_error(). And you can never get the
message back once you close the connection:
MYSQL* conn = mysql_init( 0 );
// do something causes an error.
mysql_close( conn );
printf( "error: %s", mysql_error( conn ) ); // Messed up.
>
> Boris
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net