This program (see below) works in d0chb if used with the exception option (this option is disabled by default): d0chb:/home/gris/mytest> setup D0RunII // Setup KCC d0chb:/home/gris/mytest> kcc-ar2 -x eg_errh.cpp d0chb:/home/gris/mytest> a.out Bien Ok d0chb:/home/gris/mytest> In mausi (gcc version egcs-2.91.57) the program does not work, exception handling is on by default but it does not catch the throw from the class: mausi:/home/gris/cpp/tiny> gpp -fhandle-exceptions eg_errh.cpp cc1plus: warning: -fhandle-exceptions has been renamed to -fexceptions (and is now on by default) mausi:/home/gris/cpp/tiny> a.out Abort mausi:/home/gris/cpp/tiny> gpp -fexceptions eg_errh.cpp mausi:/home/gris/cpp/tiny> a.out Abort mausi:/home/gris/cpp/tiny> The program aborts because it does not catch the throw. In groucho it works (gcc version 2.7.2) with the -fhandle-exceptions option. ///////////////////////////////////////////////////// // eg_errh.cpp : A simple exception handling example. #include class ClassB { }; // This first! class MyClass { int i; public: MyClass(int j = 0) { i = j; }; void seti(int f) { if (f > 10) throw ClassB(); i = f; }; }; int main() { MyClass mc; try{ mc.seti(11); cout << endl << "MAL" << endl; } catch (ClassB b) { cout << endl << "Bien" << endl; } catch (...){ } cout << endl << "Ok" << endl; return 0; } There seems to be a bug with gcc version egcs-2.91.57, if in the program seti() is change to: void seti(int f) { if (f > 10) throw ClassB(); i = f; cout << "Hola"; }; then it works!!