// Exceptions.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include #include using namespace std; void handler(int signal) { throw 23; } int _tmain(int argc, _TCHAR* argv[]) { signal(SIGINT, handler); signal(SIGSEGV, handler); try { int* p = NULL; *p += *p; //raise(SIGINT); cout << "... no catchie ..." << endl; } catch (...) { cout << "CAUGHT THE MOFO!" << endl; } return 0; }