How to treat 0x40010006 exception in vectored exception handler?

1

I register my own vectored exception handler, to catch and trace various exceptions in my application.

Sometimes I get an exception having 0x40010006 code, which is thrown by OutputDebugString function. Certainly, I'd like just to ignore it. What would be the appropriate return value in this case: EXCEPTION_CONTINUE_EXECUTION or EXCEPTION_CONTINUE_SEARCH?

windows
exception-handling
asked on Stack Overflow Sep 6, 2012 by Igor R. • edited Sep 6, 2012 by Igor R.

1 Answer

3

You'll find exception codes listed in the ntstatus.h SDK header file. This one is DBG_PRINTEXCEPTION_C, some likelihood that you typed Ctrl+C to trigger it.

Exception codes with values less than 0x80000000 are just informal and never an indicator of real trouble. In general, you should never mess with exceptions that you don't recognize and don't want to explicitly handle. Let Windows continue searching for a handler by returning EXCEPTION_CONTINUE_SEARCH, the debugger will probably catch it in this case.

answered on Stack Overflow Sep 6, 2012 by Hans Passant • edited Apr 1, 2014 by Hans Passant

User contributions licensed under CC BY-SA 3.0