From: dave@boostpro.com   
      
   on Tue Jun 05 2012, Thomas Richter wrote:   
      
   > { Reformatted; please limit your lines to 70 characters -mod/we }   
   >   
   > Am 05.06.2012 11:40, schrieb Zeljko Vrba:   
   >   
   >> I apologize for the wording, but this doesn't make sense. If you   
   >> throw from the destructor then either   
   >>   
   >> 1) stack unwinding is not in progress, so you can catch the   
   >> exception and handle the error as usual (isn't the whole point   
   >> of exceptions that you can ignore WHERE it came from? -- what   
   >> makes an exception thrown from a dtor different from an   
   >> exception thrown from a regular method?)   
   >   
   > Can you? What happened with the object under destruction?   
   > Apparently, it is not properly destructed, otherwise there wouldn't   
   > be an exception,   
      
   I think that is a leap of logic. All we know about what happened is   
   that the destructor emitted an exception and the object's lifetime has   
   ended.   
      
   > yet you have no longer a way of accessing this object and trying a   
   > different clean-up strategy.   
      
   That's true. But maybe you don't need a different clean-up strategy.   
   It's certainly possible---even easy---to design a class that is "fully   
   destroyed" in every important sense of the phrase even if the   
   destructor throws.   
      
   --   
   Dave Abrahams   
   BoostPro Computing   
   http://www.boostpro.com   
      
      
    [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
    [ comp.lang.c++.moderated. First time posters: Do this! ]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|