Messages per Month
29 messages in com.mysql.lists.plusplusRe: Getting errnum() in exception?| From | Sent On | Attachments |
|---|---|---|
| Warren Young | 11 Jul 2007 14:47 | |
| Jim Wallace | 20 Sep 2007 08:47 | |
| Warren Young | 21 Sep 2007 15:11 | |
| Jim Wallace | 25 Sep 2007 06:00 | |
| Jim Wallace | 25 Sep 2007 07:42 | |
| Jim Wallace | 26 Sep 2007 06:28 | |
| Warren Young | 26 Sep 2007 12:20 | |
| Warren Young | 26 Sep 2007 13:24 | |
| Warren Young | 26 Sep 2007 13:28 | |
| Jim Wallace | 04 Oct 2007 19:40 | |
| Warren Young | 05 Oct 2007 08:35 | |
| Jim Wallace | 24 Oct 2007 08:12 | |
| Jim Wallace | 24 Oct 2007 11:39 | |
| Jim Wallace | 24 Oct 2007 11:40 | |
| Jim Wallace | 24 Oct 2007 11:41 | |
| Jim Wallace | 24 Oct 2007 11:42 | |
| Jim Wallace | 24 Oct 2007 11:43 | |
| Warren Young | 25 Oct 2007 05:43 | |
| Warren Young | 25 Oct 2007 06:15 | |
| Warren Young | 25 Oct 2007 07:05 | |
| Warren Young | 25 Oct 2007 07:23 | |
| Jim Wallace | 25 Oct 2007 07:52 | |
| Jim Wallace | 25 Oct 2007 07:53 | |
| Jim Wallace | 25 Oct 2007 08:48 | |
| Warren Young | 25 Oct 2007 09:34 | |
| Jim Wallace | 25 Oct 2007 09:51 | |
| Jim Wallace | 25 Oct 2007 10:59 | |
| Warren Young | 25 Oct 2007 11:25 | |
| Jim Wallace | 25 Oct 2007 11:34 |
| Subject: | Re: Getting errnum() in exception?![]() |
|---|---|
| From: | Warren Young (mysq...@etr-usa.com) |
| Date: | 09/21/2007 03:11:11 PM |
| List: | com.mysql.lists.plusplus |
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.




