The strangest thing is that such classes do not exist since a long time.
They're a required first step for RAID conformant code. Not only this is required in order to use exceptions, it's a strongly better way to code.
So there will be less XPCOM component in the code than there's now, but 100% of what will stay *needs* to be rewriten in this style.
(From Alex: I have no idea what "RAID conformant" means. But I disagree with the premise you make
that classes like these don't exist. Reference nsCOMPtr, nsTArray for examples.)
You've implemented D's scope feature (well with more stuff, but scope(failure) was primarily what you were after :P
(scope stuff is a fair ways in)
http://digitalmars.com/d/2.0/exception-safe.html
http://digitalmars.com/d/2.0/statement.html#ScopeGuardStatement