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
?
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.
User contributions licensed under CC BY-SA 3.0