[system] Dynamic error message with context (like MySQL client API)

Hi, everyone, I'm writing a MySQL client API wrapper with Boost.Asio and Boost.System. And I want to encapsulate all MySQL error codes with boost::system::error_code. But I found out that error messages corresponding to a specified error code value is designed to be unique within Boost.System, which retrieves the error message from the `message()' method of corresponding boost::system::error_category subclass. MySQL provides an API mysql_error, which accepts a connection handle and returns the error message of the last error on this connection. Also, the content of the error message is dynamic. So here is my question: is there any way to provide context related rather than static error messages with Boost.System? Any reply would be appreciated! Cheers Lian
participants (1)
-
Lian Cheng