TITLE: Throwing exceptions in destructors (more details) PROBLEM: jaf3@ritz.cec.wustl.edu (John Andrew Fingerhut) But can't you throw an exception in a catch block? If so, I am confused by your statement. It would seem that destructors (and functions called by destructors) are the only place where you would have this trouble. I would assume that by saying "while an exception is being handled" means before control is passed to a catch block which is equivilent to while the stack is being unwound. Is this correct? RESPONSE: clamage@Eng.Sun.COM (Steve Clamage), 17 Mar 95 I was speaking loosely for the context of the original question. Here is a more detailed (but still incomplete) answer. Consult a textbook for more. When an exception is thrown, the runtime system looks for a handler (a catch-block). Until the catch-block is entered, the exception is unhandled. If during stack unwinding to find a catch-block, a destructor exits by throwing an exception, terminate() is called immediately. Once inside a catch-block, no exception remains unhandled (by definition), so you can do what you like, including throwing a new exception or re-throwing the old one. Suppose inside function F we create an auto object A. Function F calls other functions, and suppose one of them throws an exception unknown to F (due to nested function calls). If the stack unwinds back to F, and F does not catch the exception, object A will be destroyed. If the destructor for A exits via an exception, terminate() is called, which normally means the program is aborted. If you can somehow know that this sequence of events can never happen, throwing the exception from A's dtor is ok. Since in general you cannot know this, it is best to avoid throwing exceptions from dtors as a rule of thumb. There are specific cases where it might be safe, but I recommend the "guilty until proven innocent" approach.