All, It seems that BadRequest exceptions, like the ones thrown by checkValidId() in OFS.ObjectManager (lib/python/OFS/ObjectManager.py), are not handled by a standard_error_message. That is, I can't skin the error message so it looks friendly and doesn't show a traceback. Does anyone know where the code that generates the error message for these exceptions is kept? Is there a way to make these exceptions get handled via standard_error_message? Thanks, Tom Palermo Senior Web Developer Constella Group, LLC
Palermo, Tom wrote at 2006-3-3 13:56 -0500:
... It seems that BadRequest exceptions, like the ones thrown by checkValidId() in OFS.ObjectManager (lib/python/OFS/ObjectManager.py), are not handled by a standard_error_message.
Some "BadRequest" exceptions are not handled by "standard_error_message" (a bug, please file a bug report). But, this is not the case for the one from "checkValidId". Affected are errors detected in "REQUEST.processInputs()". They are not handled by "standard_error_message" because they are detected too early -- before traversal has even begun. As a result, there is not yet any "standard_error_message" in the request context. These errors are usually type errors during conversion of request parameters called for by ":<type>" suffixes, e.g. "start:int=a" would cause such an error. The easy workaround is not to use such ZPublisher type conversions but perform the conversions yourself in your application code. -- Dieter
participants (2)
-
Dieter Maurer -
Palermo, Tom