9 messages in com.mysql.lists.plusplusRe: Catching Exceptions| From | Sent On | Attachments |
|---|---|---|
| Adam Clauss | 26 May 2003 16:31 | |
| Ben Clewett | 27 May 2003 00:42 | |
| Markus Gerwinski | 27 May 2003 00:59 | |
| Murr...@Comneon.com | 27 May 2003 01:16 | |
| Markus Gerwinski | 27 May 2003 01:38 | |
| Murr...@Comneon.com | 27 May 2003 01:46 | |
| Adam Clauss | 27 May 2003 11:17 | |
| Sinisa Milivojevic | 28 May 2003 03:52 | |
| Warren Young | 28 May 2003 09:05 |
| Subject: | Re: Catching Exceptions![]() |
|---|---|
| From: | Ben Clewett (B.Cl...@roadrunner.uk.com) |
| Date: | 05/27/2003 12:42:43 AM |
| List: | com.mysql.lists.plusplus |
It may not be related, but in this version I cannot get exceptions for work either.
But in my case, the application drops a core when an exception is thrown. Unfortunatelly my skills are not up to explaining why or where. I can tell you it happens on all the example programs given, (eg, simple1) and happens whether the --enable-exception flag is set or not. Using a debugger, I can tell you it might be happening either on creation of the exception, or automatic deletion of this when the 'return -1' is called. If an exception is not thrown, MySQL and the applications work without fault.
Ben
Adam Clauss wrote:
I'm using the C++ API for Visual Studio. When errors occur during connection, executing queries, etc, it throws a MysqlBadQuery exception. I can see when I run it that is the exact type being thrown. However, despite my best efforts, I can't seem to actually catch it. Connection con; bool result = false; try { result = con.connect("test2"); } catch (MysqlBadQuery *ex) { printf("error!"); }
I always get: Unhandled exception at 0x77e73887 (kernel32.dll) in testsql.exe: Microsoft C++ exception: MysqlBadQuery @ 0x0012f9f4.
The exception is being thrown because the specified database (test2) does not exist - so I know it is right in that the exception is being thrown... But I can't figure out why it won't let me catch it!
Adam Clauss caba...@tamu.edu




