On Oct 19, 2004, at 2:29 PM, Sean Hastings wrote:
And this is not just a case where the missing components would have been added after the point in the control flow where the Exception was thrown, but before it was caught?
Essentially it is, but the end result is that you have a half-constructed object in the persistent store, which is what I thought Dieter meant by "inconsistencies in persistent data". If the steps could be re-arranged a bit so that the page isn't attached to the parent folder until it is fully constructed, there wouldn't be a problem. The page would either fully exist in the persistent store or be garbage collected. Since the page is first made persistent before the other steps, nearly anything other than letting an exception bubble all the way up to ZPublisher will commit the transaction and keep a reference to the page object. One other option is to use _delOb to try to undo the attachment of the new page to its folder, but there is no reason to be sure that _delOb will not fail.