Hi, all I'm currently building an asynchronous MySQL client API based on Boost.Asio, whose error handling is based on Boost.System. And thus, I wrote some code to wrap MySQL error codes and error messages with Boost.System. While writing the code, I found that the library doesn't provide a general enough abstraction. As the document says, there should always be only one instance of each error_category class. And each error_code instance communicates with its error_category through only the error number. Then here is the problem. MySQL error code is a property of a single MySQL connection. The mysql_errno() and mysql_error() functions both require a MYSQL* connection handle as parameter to retrieve the last error number and error message of the given MySQL connection. And the error messages provided by MySQL API are actually printf format strings. The mysql_error() function fills the format strings with information related to the MYSQL* handle. But in Boost.System, I've got no idea how to pass the connection handle to the error_category::message() function so that a proper error message can be retrieved. Is there any way to fix this problem? Or the library itself is just not general enough? You see, not all error numbers can be directly mapped to a well defined error message string. Cheers Cheng