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. Managed C++/CLI
  4. How to catch exception caused by third party dll in c++?

How to catch exception caused by third party dll in c++?

Scheduled Pinned Locked Moved Managed C++/CLI
csharpc++visual-studiojsontutorial
5 Posts 3 Posters 15 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
    Sampath579
    wrote on last edited by
    #1

    Hi I am working on a C++ Project in which i am using some third party SDK to read some data. Some times few API's in that third party SDK are getting crashed such that my program getting terminated\crash. So, instead of crash i want to handle those exceptions in the third party API's. May i know how to do handle them. I am using Visual studio 2015 and used exception handling too but unable to catch the exceptions thrown by third party API's. Regards Sampath

    L 1 Reply Last reply
    0
    • S Sampath579

      Hi I am working on a C++ Project in which i am using some third party SDK to read some data. Some times few API's in that third party SDK are getting crashed such that my program getting terminated\crash. So, instead of crash i want to handle those exceptions in the third party API's. May i know how to do handle them. I am using Visual studio 2015 and used exception handling too but unable to catch the exceptions thrown by third party API's. Regards Sampath

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Contact the owners of the library for help. Unless you know exactly where the exceptions occur, and what they are caused by, you will find it very difficult to gather any meaningful information.

      S 1 Reply Last reply
      0
      • L Lost User

        Contact the owners of the library for help. Unless you know exactly where the exceptions occur, and what they are caused by, you will find it very difficult to gather any meaningful information.

        S Offline
        S Offline
        Sampath579
        wrote on last edited by
        #3

        Thank You. As of now we are reporting the issues to the owners of the library and they are fixing and providing the fixes in their next release. But i cannot hold my work till their fix. Some how i need to proceed by excluding those exceptions in my code. Is it possible by any chance or any technique to skip those crashes and handling them in my code?

        L S 2 Replies Last reply
        0
        • S Sampath579

          Thank You. As of now we are reporting the issues to the owners of the library and they are fixing and providing the fixes in their next release. But i cannot hold my work till their fix. Some how i need to proceed by excluding those exceptions in my code. Is it possible by any chance or any technique to skip those crashes and handling them in my code?

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          No idea, only the owners of the library can answer that question. And ignoring errors is probably the most dangerous thing you can do in any application.

          1 Reply Last reply
          0
          • S Sampath579

            Thank You. As of now we are reporting the issues to the owners of the library and they are fixing and providing the fixes in their next release. But i cannot hold my work till their fix. Some how i need to proceed by excluding those exceptions in my code. Is it possible by any chance or any technique to skip those crashes and handling them in my code?

            S Offline
            S Offline
            sameer p deshmukh
            wrote on last edited by
            #5

            You can add generic Catch block in your code for function which is calling that third party APIs and in catch you do nothing.But its just to avoid your application from getting crash, ideally you should not do it as it makes no sense.

            ~Sam

            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