using namespace std; #include <Exception.h> #include "TraceFct.h" void f2( ) { Exception ex( "My First Problem" ); ex.set_message( "My Second Problem" ); ex.set_message( "My Third Problem" ); ex.set_message( "My Liney\nFourth Problem" ); throw ex; } void f1( ) { TraceFct tf( "f1" ); try { f2(); } catch( Exception& e) { tf.exit( 1, e ); } } int main( int argc, char * argv[] ) { TraceFct tf( argv[0], 0, -1 ); f1( ); tf.close( ); tf.message( "main stack dump\n" ); tf.dump_stack( ); return EXIT_SUCCESS; }