[Zope] standard_error_message

John Chandler johnc@nipltd.com
Tue, 2 May 2000 13:36:15 +0100 (GMT)


> We've experienced exactly the same problem. We were trying to use a property 
> of a folder to email errors to the appropriate person, but some (maybe all, I
> can't remember, John?) errors always resulted in the root folder's property
> being used rather than the property of the appropriate folder.

I've just double-checked this and yep, it appears to be all errors using
only the root. This is on 2.1.4, I'll check 2.1.6 shortly...

If I have a standard_error_message in root and a property 'ErrorTo' in
root, standard_error_message is called from everywhere in the site and
uses the property in root. So far so good...

If I delete the property from root, the standard_error_message is used
throughout the site, but the property doesn't exist. Again, so far so
good...

If I add the ErrorTo property back, but to a different folder and get an
error from within that folder, the root standard_error_message is still
used, but the property isn't found. If I add an ErrorTo property back to
root, it is used.

If I now add a different standard_error_message to that folder, and get an
error, the root standard_error_message is still used with the root
property.

> > That's why I figured, perhaps, when looking for the 'badfile', the
> > namespaces were searched all the way down the tree.  When it didn't find it
> > anywhere, it just printed the error message from where it ended up, which
> > was at the root.  Makes sense to me..  Course I'm not sure how it all really
> > works internally.
> 
> This sounds entirely plausible. Can anyone from DC comment on this just so we

Yep, that matches my personal experiences...


John

--
 John Chandler  /  Software Developer  /  New Information Paradigms Ltd
   [ Linux in the office, AmigaOS in the home, PalmOS in the pocket ]
------------------------------------------------------------------------
 The opinions above aren't those of my company...
                           ...but then, they aren't really mine either.