0

In the code I am implementing I have

__except(EXCEPTION_EXECUTE_HANDLER)
    {
        return false;
    }

And there is an execution path when the exception occurs How can I know why the exception happened while debugging? Use GetExceptionInformation?-Can it print the exception or give me exception`s data?

2
  • 2
    make your debugger break at the point where exceptions are thrown
    – PlasmaHH
    Commented Mar 19, 2013 at 10:51
  • Note that swallowing exceptions is not a good idea in general because you don't know whether the exception is recoverable (and if it is, how to recover from it). Commented Mar 20, 2013 at 5:54

1 Answer 1

2

In Visual Studio, you can go to Debug > Exceptions (in the menu). There's a checkbox for each exception type which enables you to break execution when the exception is thrown.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.