[Zope3-dev] Re: [Zope-dev] Re: tal:on-error is a bare except...

Jim Fulton jim at zope.com
Tue Aug 24 09:00:06 EDT 2004


Shane Hathaway wrote:
> On Sunday 22 August 2004 20:36 pm, Jim Fulton wrote:
> 
>>Hm. I wonder if SystemError would be appropriate here.
>>(Zope may abuse SystemError, but we could fix that.)
> 
> 
> SystemError has a pretty clear meaning: it is akin to abort() in C, but it's 
> recoverable.  Using it for other purposes seems like an abuse.  What about 
> using RuntimeError as the base for error types that should only be caught by 
> the framework? 

I'll note that I think the primary issue is not who an error should be caught
by, but rather whether it should be caught specifically, as apposed to being
caught by a general (bare or Exception) exception handler.

 > RuntimeError is currently documented as a "relic from a
> previous version"; Zope could give it a new meaning that happens to be 
> similar to Java's RuntimeException.

Sounds good to me.  I think it might be worth widening the scope beyond
Zope. Obviously, the first application of this is ZODB. I'll
see what Tim and Fred think.  Maybe we should actually try to give this a
standard meaning in Python.

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


More information about the Zope3-dev mailing list