Martin Aspeli wrote: > cewing wrote: >> >> I've got a content type that represents a certain type of data file, a >> VR2File. When a VR2File is added to the portal, I've been using a >> registered handler for IObjectInitializedEvent to parse the data from the >> uploaded file and insert the results into an external relational >> database. > > Have you looked at ContentMirror? It does this kind of thing. If nothing > else, you should be able to see how it deals with this kind of thing. > >> Up until now, when an error was raised in the parser code, I've been >> allowing it to bubble up and abort the zope transaction, so that neither >> the >> VR2File object, nor the rows in the external database get preserved. >> This works functionally, but has a major drawback. >> >> The problem is that when the parsing of a VR2File fails, my users are >> confronted with an unfriendly error message
I do exactly this - but my parsing happens in a field validation step. It doesn't really matter what field you're validating - you can get hold of the whole request. I'll have to have a look at that ContentMirror, though. -- derek _______________________________________________ Product-Developers mailing list [email protected] http://lists.plone.org/mailman/listinfo/product-developers
