[Zope3-dev] Better exception display

holger krekel pyth@devel.trillke.net
Wed, 22 Jan 2003 00:35:28 +0100


Jim Fulton wrote:
> 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). ;)

When i am developing Zope2 stuff i often get long tracebacks when
trying to perform a certain action TTW.  I might not even have changed
the code but did a 'cvs up'.  So here is my application with all
the ZPT-rendering, macros and application level stuff going on. 
And a traceback with 20 entries.  where the last problems took 
place in some ZPT which was invoked through a script through other
ZPTs.  No doubt, someone more knowledgable (and knowing the app)
might rather quickly deduce where the problem actually is. 

I am just saying that a different representation of Exceptions
would probably not help me too much.  Unless Shane is right
and the Zope2.6 error handling already offers enough
improvement for such situations.

regards,

    holger