On May 9, 2009, at 11:52 AM, Chris Withers wrote:

> Hanno Schlichting wrote:
>> Try following the description given in the changelog at
>> http://svn.zope.org/Zope/branches/2.11/doc/CHANGES.txt?view=markup  
>> under
>> "Zope 3-based exception views".
>
> Hmm, so I would I register different views for a KeyError versus an
> AttributeError?


Not unless you actually need different views for them, which you  
probably don't.

In my experience, you only need a few, as described in change notes.   
One additional one that isn't mentioned in the change notes but that I  
use a lot is UserError (zope.exceptions.UserError).  This is an  
exception to raise when you want to display an end-user error message.

Most exceptions are really application errors and should be handled by  
a view for Exception that displays a system error message.

Jim

--
Jim Fulton
Zope Corporation


_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to