这是因为应用程序内部的运行库代码捕捉并处理了这个异常,没有执行到崩溃和JIT调试那一阶段。
如果是带有窗口的MFC程序,那么MFC库的默认窗口函数中有一个TRY{}CATCH(),用户代码没有处理的异常会被这个CATCH捕捉到,参考MFC源代码的WINCORE.CPP中的AfxCallWndProc函数:
LRESULT AFXAPI AfxCallWndProc(CWnd* pWnd, HWND hWnd, UINT nMsg, WPARAM wParam = 0, LPARAM lParam = 0) {
...
TRY { #ifndef _AFX_NO_OCC_SUPPORT // special case for WM_DESTROY if ((nMsg == WM_DESTROY) && (pWnd->m_pCtrlCont != NULL)) pWnd->m_pCtrlCont->OnUIActivate(NULL); #endif
// special case for WM_INITDIALOG CRect rectOld; DWORD dwStyle = 0; if (nMsg == WM_INITDIALOG) _AfxPreInitDialog(pWnd, &rectOld, &dwStyle);
// delegate to object's WindowProc lResult = pWnd->WindowProc(nMsg, wParam, lParam);
// more special case for WM_INITDIALOG if (nMsg == WM_INITDIALOG) _AfxPostInitDialog(pWnd, rectOld, dwStyle); } CATCH_ALL(e) { lResult = AfxGetThread()->ProcessWndProcException(e, &pThreadState->m_lastSentMsg); TRACE1("Warning: Uncaught exception in WindowProc (returning %ld).\n", lResult); DELETE_EXCEPTION(e); } END_CATCH_ALL
|