By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,870 Members | 2,400 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,870 IT Pros & Developers. It's quick & easy.

exception raised in destructor

P: n/a
Allegedly, it is a well-known practice to avoid throwing an exception
from destructor. What are they - consequences and what a general
techniques when exception are possible (like fail to close db
connection or socket, etc)? BTW, how can you have two active exception
at the same time? What is the neteffect; program termination? Does
standard say anything in this regard?

Thanks

Aug 6 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
puzzlecracker wrote:
Allegedly, it is a well-known practice to avoid throwing an exception
from destructor.
Why "allegedly"?
What are they - consequences and what a general
techniques when exception are possible (like fail to close db
connection or socket, etc)?
Program termination.
BTW, how can you have two active exception
at the same time?
I can't.
What is the neteffect; program termination? Does
standard say anything in this regard?
Yes, it does. See [except.terminate]/1, the third bullet point.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Aug 6 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.