ADO Exception Handling
-
Hi, I have small problem. I am implementing exception handling as recommended in MSDN and in the KB articles, thus: try { objConn.Open(...); } catch(_com_error &errorConnecting) { strError = (char *) errorConnecting.Description(); } However, if there ever is an error, I get a first-chance exception on the catch line. I have step debugged the code and it is that line. Despite the exception, the code continues and functions correctly. Is this a problem I should be worried about when I move to release build, and if so how can I prevent it? Thanks in advance, Simon
-
Hi, I have small problem. I am implementing exception handling as recommended in MSDN and in the KB articles, thus: try { objConn.Open(...); } catch(_com_error &errorConnecting) { strError = (char *) errorConnecting.Description(); } However, if there ever is an error, I get a first-chance exception on the catch line. I have step debugged the code and it is that line. Despite the exception, the code continues and functions correctly. Is this a problem I should be worried about when I move to release build, and if so how can I prevent it? Thanks in advance, Simon
maybe you have break always on for your exeptions To check, start the program whith step into(F11) and look under Debug->Exceptions You'll get a dialog that allows you to set up the exception handling during debugging. Check the Microsoft C++ Exception, if this says stop always then indeed you will get the first chanche... You can change it to stop if not handled and get notification only if an exception is not handled, but this includes cach all handling from the MFC framework. (you could also just press ctrl+F5 to start the program outside the vc debugger and see what it does) good luck Rutger