// exceptions_Unhandled_Exceptions.cpp
// compile with: /EHsc
#include <iostream>
using namespace std;
void term_func() {
cout << "term_func was called by terminate." << endl;
exit( -1 );
}
int main() {
try
{
set_terminate( term_func );
throw "Out of memory!"; // No catch handler for this exception
}
catch( int )
{
cout << "Integer exception raised." << endl;
}
return 0;
}
출처:https://msdn.microsoft.com/ko-kr/library/ac9f67ah.aspx
'유지보수 > WinDBG' 카테고리의 다른 글
| WINDBG 명령어 (0) | 2017.11.16 |
|---|---|
| 메모리 릭 _CrtSetDbgFlag, / _CrtSetBreakAlloc (0) | 2017.07.19 |
| 덤프파일 만들기 관련 글. (0) | 2017.04.26 |
| 컴파일 옵션. (0) | 2016.12.08 |
| 명령어 정리 (1) | 2016.12.07 |