Topic: Function Try Blocks


Author: fjh@cs.mu.OZ.AU (Fergus Henderson)
Date: 1995/05/22
Raw View
shepherd@debussy.sbi.com (Marc Shepherd) writes:

>Subclause 15.3 of the draft WP says:
>   The exception being handled shall be rethrown if control reaches
>   the end of a handler of the function-try-block of a constructor
>   or destructor.
>
>Does the phrase 'The exception being handled shall be rethrown'
>mean that:
>
>   -- the program is ill-formed unless the function-try-block
>      rethrows the exception;
>
>                  OR
>
>   -- the implementation shall rethrow the expression on
>      the programmer's behalf (even if the programmer did
>      not explicitly do so)?

It means the latter.

The use of "shall" to express constraints on either the implementor
or the programmer, depending on the context, is a problem that occurs
throughout the draft.

--
Fergus Henderson - fjh@munta.cs.mu.oz.au
--
Fergus Henderson - fjh@munta.cs.mu.oz.au





Author: shepherd@debussy.sbi.com (Marc Shepherd)
Date: 1995/05/19
Raw View
Subclause 15.3 of the draft WP says:

   If a return statement appears in a handler of function-try-block
   of a constructor, the program is ill-formed.

   The exception being handled shall be rethrown if control reaches
   the end of a handler of the function-try-block of a constructor
   or destructor.  Otherwise, the function shall return when control
   reaches the end of a handler for the function-try-block.

Does the phrase 'The exception being handled shall be rethrown'
mean that:

   -- the program is ill-formed unless the function-try-block
      rethrows the exception;

                  OR

   -- the implementation shall rethrow the expression on
      the programmer's behalf (even if the programmer did
      not explicitly do so)?


---
Marc Shepherd
Salomon Brothers Inc
shepherd@schubert.sbi.com The opinions I express are no one's but mine!