Variable of type test is being instantiated. Value=1 main() starting... Variable of type test is being instantiated. Value=2 Variable of type test is being instantiated. Value=3 f() starting: i=2 Variable of type test is being instantiated. Value=4 OK f() finished Variable of type test is going out of scope. Value=4 f() starting: i=-3 Variable of type test is being instantiated. Value=4 Throwing exception Error is being instantiated, errno=-3 Derived Error is being instantiated, addition=-0.333333 Variable of type test is going out of scope. Value=4 Caught error number -3 class derivederror, errno=-3,addition=-0.333333 Derived Error is going out of scope, addition=-0.333333 Error is going out of scope, errno=-3 Now: errno=3 Variable of type test is going out of scope. Value=3 main() ending... Variable of type test is going out of scope. Value=2 Variable of type test is going out of scope. Value=1