In short: no.
If I understand your question properly, what you want to do is execute all the code in the try {...} block before the exception transfers control to the catch (...) {...} block.
If that is the case, you need to reconsider how exceptions work. Anytime an exception is thrown control immediately transfers out of the current block and up the chain until it is handled.
This is also reasonable, because the error occurred when marker had a value of 1, not 2. In your example, you don't want marker to have a value of 2 if the E2 constructor throws an exception, since further on you'll try to delete E2 when it doesn't exist...
However, if you just have a list of initializations that must occur before some exception may, put them before the code that may cause the exception.
Hope this helps.
Reputation Points: 1140
Solved Threads: 229
Postaholic
Offline 2,039 posts
since Oct 2007