[Zope3-dev] Better exception display

Jim Fulton jim@zope.com
Tue, 21 Jan 2003 14:26:54 -0500


holger krekel wrote:
> Jim Fulton wrote:
> 
>>Here's a fun little project for someone. :)
>>
>>We want to display errors nicely, but we may not know how to do so.
>>
>>In Zope 2, we have this rool that if the str of an exception contains
>>HTML markup, then it must be meant for a human. This is not so good. :)
>>
>>The zope 3 way to do this is to define views for exception objects.
>>This way, we can configure the system to handle different kinds of errors
>>in a way that is appropriate to the error type and to the presentation type.
>>
>>When an error percolates up to the publication machinery, the machinery
>>simply looks up a view for the error and displays that.
> 
> 
> The problem i have with Zope2 is more that the actual error 
> information (no matter how it is presented) doesn't make it 
> easy to locate the problem.  Sometimes it's obvious but
> often it is not (especially during development). 

Well, I suspect that using separate views will make it easier to
make messages more helpful.

I'll note that your note is like the exceptions you are complaining
about. It doesn't give enough information to locate the problem
(in the error reporting). ;)

Jim

-- 
Jim Fulton           mailto:jim@zope.com       Python Powered!
CTO                  (888) 344-4332            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org