Are exceptions working for you? (or is there something wrong with the following?) #include <stdexcept> int main() { try { throw runtime_error("Wibble!"); } catch(const runtime_error& e) { cerr<<"Caught: "<<e.what()<<'\n'; exit(1); } cout<<"Hello\n"; return 0; } % c++ trial.cc -o trial -Wall % trial Abort trap (core dumped) Cheers, Patrick