유지보수/WinDBG
처리되지 않은 c++ 예외 처리.
산과 나무
2017. 4. 21. 10:05
// 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