|
Boost Users : |
Subject: [Boost-users] [system] Dynamic error message with context (like MySQL client API)
From: Lian Cheng (rhythm.mail_at_[hidden])
Date: 2011-04-18 21:47:26
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
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