From: rswarbrick@googlemail.com   
      
   DeMarcus writes:   
   > [*] You should be very careful with catching ellipsis (...). If you do   
   > you must at least rethrow, like this:   
   >   
   > catch (...)   
   > {   
   > cleanup();   
   > throw;   
   > }   
   >   
   > (I challenge anyone reading this to come up with examples where one   
   > would ever need to catch ellipsis)   
      
   I think I have one: to implement the task group functionality described   
   in the recent N3711. Quoting from them:   
      
    If any of the tasks throws an exception, ~task_group invokes the   
    ExceptionHandler with the exception_list containing the   
    std::exception_ptr objects that represent all the exceptions thrown by   
    the tasks spawned by the run method.   
      
   I haven't read their prototype implementation, so maybe they only catch   
   children of std::exception, but implementing something like this is   
   probably a use case.   
      
   Rupert   
      
      
   --   
    [ 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)   
|