Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. ADO Exception Handling

ADO Exception Handling

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestionannouncement
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    soup
    wrote on last edited by
    #1

    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

    R 1 Reply Last reply
    0
    • S soup

      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

      R Offline
      R Offline
      Rutger Ellen
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups