Re: Getting errnum() in exception?
Jim Wallace wrote:
> I assume this is because when the BadQuery > exception is constructed calls error() which calls mysql_error() but > that clears out the errornum() (mysql_errno()).
Test this assumption before doing any work based on it. Some of the
reasons I'm skeptical:
- I don't see mention any such behavior in the MySQL C API docs
- I think I'd remember if MySQL++ cleared the error number itself
- Not all BadQuery exceptions carry the return value of
Connection::error() as the message, so if you're catching one of those,
the error number would already be meaningless
> If not, adding an unsigned int to the BadQuery exception class
If you're going to do this, add it to every exception where it makes sense.
--
MySQL++ Mailing List
For list archives:
http://lists.mysql.com/plusplus
To unsubscribe:
http://lists.mysql.com/plusplus?unsub=lists@pantek.com
Received on Fri Sep 21 18:09:55 2007
This archive was generated by hypermail 2.1.8
: Sun Oct 07 2007 - 10:03:19 EDT
|