Disable Microsoft Visual C++ Runtime Error

风格不统一 提交于 2019-11-28 12:18:37

This error message appears if an exception is not handled and unexpected() is called or if an exception escapes a destructor during stack unwinding and terminate() is called. Both lead to abort() being called and its abort() implementation that shows the message box. This behaviour is by design in VS2k3, VS2k5 and VS2k8. It is really annoying especially in applications meant to run without human intervention (like daily builds for example).

You can workaround this behaviour - use catch(...) to catch all exceptions at the top level and set your own terminate() handler using set_terminate().

use:

_set_abort_behavior( 0, _WRITE_ABORT_MSG);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!