[omniORB] catching exceptions in _remove_ref

Duncan Grisby duncan at grisby.org
Thu Apr 5 17:38:53 BST 2007


On Wednesday 14 March, Teemu Torma wrote:

> I've had couple of instances over the years when a servant destructor 
> leaks an exception when poa calls _remove_ref, causing the shutdown to 
> hang.  Destructors should not throw, but bugs infestations happen 
> sometimes during development.
> 
> These cases a bit hard to find and debug, and since letting the 
> exception propagate does never any good, why not just log and ignore 
> them?  
> 
> The attached patch does this in one case, there are potentially others 
> too, and the logging could be more noisy to not go unnoticed.

Thanks for the idea. Instead of modifying places that call _remove_ref,
I've added a catch-all to the implementation of _remove_ref that deletes
the servant. That will definitely catch all cases.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list