Created on 2010-08-03.00:00:00 last changed 130 months ago
[Voted into the WP at the March, 2011 meeting.]
Proposed resolution (November, 2010):
Change Clause 14 [except] paragraph 4 as follows:
A function-try-block associates a handler-seq with the ctor-initializer, if present, and the compound-statement. An exception thrown during the execution of theinitializer expressions in the ctor-initializer or during the execution of thecompound-statement or, for constructors and destructors, during the initialization or destruction, respectively, of the class's subobjects, transfers control to a handler in a function-try-block in the same way as an exception thrown during the execution of a try-block transfers control to other handlers.
Additional note (October, 2010):
There is a related problem with this wording: it covers only “the execution of the initializer expressions in the ctor-initializer,” when it should also cover execution of base and member constructors, regardless of whether they have initializer expressions in the ctor-initializer or not.
The issue has been moved back to "review" status to allow consideration of amending the proposed resolution to something like
...during the execution of the compound-statement or, if the function is a constructor or destructor, during the initialization or destruction of the class's subobjects, transfers control...
Proposed resolution (August, 2010):
Change Clause 14 [except] paragraph 4 as follows:
...An exception thrown during the execution of the initializer expressions in the ctor-initializer or during the execution of the compound-statement, or — in the case of a destructor — during the destruction of a subobject, transfers control to a handler in a function-try-block in the same way as an exception thrown during the execution of a try-block transfers control to other handlers. [Example:...
It is not entirely clear that a function-try-block on a destructor will catch exceptions from a base or member destructor; whether such exceptions might be swallowed with a simple return statement rather than being rethrown; and whether such a clause might be entered multiple times if multiple bases/members throw, or if that is an automatic terminate call.
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-03-03 00:00:00 | admin | set | status: fdis -> c++11 |
2011-04-10 00:00:00 | admin | set | messages: + msg3408 |
2011-04-10 00:00:00 | admin | set | status: ready -> fdis |
2010-11-29 00:00:00 | admin | set | messages: + msg3063 |
2010-11-29 00:00:00 | admin | set | status: review -> ready |
2010-10-18 00:00:00 | admin | set | messages: + msg3002 |
2010-10-18 00:00:00 | admin | set | status: ready -> review |
2010-08-23 00:00:00 | admin | set | messages: + msg2817 |
2010-08-03 00:00:00 | admin | create |