#include <iostream>
Go to the source code of this file.
◆ main()
Definition at line 24 of file exctest3.cc.
24 {
25
26 try {
27 cerr << "Starting main() ..." << endl;
28 cerr << "About to: throw( Oops(\"Ouch\") )" << endl;
29
30 try {
throw Oops(
"Ouch"); }
33 throw;
34 }
35 catch ( ... ) {
36 cerr << "Caught unknown!" << endl;
37 throw;
38 }
39
40
41 cerr << "The following ought to produce a compilation warning \n"
42 << "Got past: throw( Oops(\"Ouch\") ) -- not good!" << endl;
43 }
44 catch (
const Oops & egad ) {
45 cerr << "Caught: Oops" << endl;
46 }
48 cerr << "Caught: Exception" << endl;
49 }
50 catch ( ... ) {
51 cerr << "Caught: don't know what" << endl;
52 }
53
54 cerr << "Done." << endl;
55 return 0;
56
57}