g++: Exception handling in constructor
Frank Grimm
fgr@foobar-cpa.de
Wed Dec 11 07:41:00 GMT 2002
Hi Eljay,
On Wed, Dec 11, 2002 at 08:13:20AM -0600, John Love-Jensen wrote:
> > I don't see the point that the exceptions is re-thrown _automatically_
> > when it _is_ caught by the constructor...
>
> *IF* you fall off the end of the constructor's catch block -- which is there
> to allow an opportunity for cleanup (and logging and debugging) -- *THEN*
> the exception *MUST* be propagated.
Ok, thats enlightening to me. I forgot to think about object destruction...
> Sincerely,
> --Eljay
Thanks for your comprehensible answers, Frank.
--
Frank Grimm // fgr@foobar-cpa.de
// www.foobar-cpa.de
More information about the Gcc-help
mailing list