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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to catch unhandled exceptions?

How to catch unhandled exceptions?

Scheduled Pinned Locked Moved C / C++ / MFC
questionjsontutorial
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.
  • B Offline
    B Offline
    Best Kiluyar
    wrote on last edited by
    #1

    Hi, I have an old program without and try/catch statements. Now I'm trying to handle some exceptions . However, I don't want to add any try/catch pieces in the code - it's big work. So, I hope to use a API: SetUnhandledExceptionFilter() to handle all exceptions and jump into my handle function. However, the handle function must return one of these: EXCEPTION_EXECUTE_HANDLER EXCEPTION_CONTINUE_EXECUTION EXCEPTION_CONTINUE_SEARCH This is boring, the exception will still be thrown. I hope to hide exception in my filter handle function. How can I do that?

    H 1 Reply Last reply
    0
    • B Best Kiluyar

      Hi, I have an old program without and try/catch statements. Now I'm trying to handle some exceptions . However, I don't want to add any try/catch pieces in the code - it's big work. So, I hope to use a API: SetUnhandledExceptionFilter() to handle all exceptions and jump into my handle function. However, the handle function must return one of these: EXCEPTION_EXECUTE_HANDLER EXCEPTION_CONTINUE_EXECUTION EXCEPTION_CONTINUE_SEARCH This is boring, the exception will still be thrown. I hope to hide exception in my filter handle function. How can I do that?

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      Im not sure see How a C++ compiler implements exception handling[^] does helpful?


      WhiteSky


      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