#include #include #include #include bool bContinue = true; class omniTest :public omni_thread { public: omniTest(){ cout << "In constructor" << endl; start(); } void run(void *) { cout << "In run" << endl; exit(); } }; int main() { cout << "Starting test" << endl; try { cout << "In try" << endl; omniTest *test = new omniTest(); sleep(1); cout << "Success" << endl; } catch(...) { cout << "Error thown" << endl; return 1; } sleep(1); cout << "Finished test" << endl; return 0; }