#include <iostream>
Go to the source code of this file.
◆ main()
Definition at line 20 of file exctest2.cc.
20 {
21
22 try {
23 cerr << "Starting main() ..." << endl;
24
25 cerr << "About to: throw( Oops(\"Ouch\") )" << endl;
27 throw o;
28 cerr << "The following ought to produce a compilation warning \n"
29 << "Got past: throw( Oops(\"Ouch\") ) -- not good!" << endl;
30 }
31 catch (
const Oops & egad ) {
32 cerr << "Caught: Oops" << endl;
33 }
35 cerr << "Caught: Exception" << endl;
36 }
37 catch ( ... ) {
38 cerr << "Caught: don't know what" << endl;
39 }
40
41 cerr << "Done." << endl;
42 return 0;
43
44}