Sunday 15 September 2013

visual studio - How do I avoid popping up an error dialog when my MSVS C++ app crashes -


When my Visual Studio 2008 C + command line app crashes, it sometimes produces this dialog is.

CommandProcessor.exe has encountered a problem and must close it.

We are sorry for the inconvenience. If you were among some, then the information you were working on could be lost. For more information about this error, click here.

I tried to release it and debug mode. (By the way, the debugger shows that divide it with a zero error.)

If this is crashing, then I do not want to communicate that which blocks the application Does. How can I compile my application so that there is no communication from crash?

Use catch (...) to catch all the exceptions with the EHA option Structured exceptions were included and writing console messages You can use VC ++ - specific __tray instead for structured exception handling, but this is a bit difficult for code.

Although this will not protect you against situations when called by the C ++ runtime - like an exception during stack uniniling - you can call it set_terminate () and close it () Handler Also have to change.


No comments:

Post a Comment