[Zope3-checkins] SVN: Zope3/trunk/src/zope/ Got rid of (the
pointless) ZopeError.
Jim Fulton
jim at zope.com
Tue Jul 27 11:15:58 EDT 2004
Log message for revision 26795:
Got rid of (the pointless) ZopeError.
Changed:
U Zope3/trunk/src/zope/app/component/interface.py
U Zope3/trunk/src/zope/app/traversing/namespace.py
U Zope3/trunk/src/zope/exceptions/__init__.py
U Zope3/trunk/src/zope/exceptions/_duplicate.py
U Zope3/trunk/src/zope/exceptions/_notfounderror.py
D Zope3/trunk/src/zope/exceptions/_zope_error.py
-=-
Modified: Zope3/trunk/src/zope/app/component/interface.py
===================================================================
--- Zope3/trunk/src/zope/app/component/interface.py 2004-07-27 14:58:39 UTC (rev 26794)
+++ Zope3/trunk/src/zope/app/component/interface.py 2004-07-27 15:15:58 UTC (rev 26795)
@@ -101,7 +101,7 @@
>>> getInterface(None, 'zope.app.component.interface.I4')
Traceback (most recent call last):
...
- ComponentLookupError: zope.app.component.interface.I4
+ ComponentLookupError: 'zope.app.component.interface.I4'
>>> provideInterface('', I4, IContentType)
>>> IContentType.providedBy(I4)
True
Modified: Zope3/trunk/src/zope/app/traversing/namespace.py
===================================================================
--- Zope3/trunk/src/zope/app/traversing/namespace.py 2004-07-27 14:58:39 UTC (rev 26794)
+++ Zope3/trunk/src/zope/app/traversing/namespace.py 2004-07-27 15:15:58 UTC (rev 26795)
@@ -69,7 +69,7 @@
>>> namespaceLookup('fiz', 'bar', C())
Traceback (most recent call last):
...
- NotFoundError: ++fiz++bar
+ NotFoundError: '++fiz++bar'
We'll get the same thing if we provide a request:
@@ -78,7 +78,7 @@
>>> namespaceLookup('foo', 'bar', C(), request)
Traceback (most recent call last):
...
- NotFoundError: ++foo++bar
+ NotFoundError: '++foo++bar'
We need to provide a view:
Modified: Zope3/trunk/src/zope/exceptions/__init__.py
===================================================================
--- Zope3/trunk/src/zope/exceptions/__init__.py 2004-07-27 14:58:39 UTC (rev 26794)
+++ Zope3/trunk/src/zope/exceptions/__init__.py 2004-07-27 15:15:58 UTC (rev 26795)
@@ -19,7 +19,6 @@
$Id$
"""
-from zope.exceptions._zope_error import ZopeError, IZopeError
from zope.exceptions._notfounderror import NotFoundError, INotFoundError
from zope.exceptions._duplicate import DuplicationError, IDuplicationError
Modified: Zope3/trunk/src/zope/exceptions/_duplicate.py
===================================================================
--- Zope3/trunk/src/zope/exceptions/_duplicate.py 2004-07-27 14:58:39 UTC (rev 26794)
+++ Zope3/trunk/src/zope/exceptions/_duplicate.py 2004-07-27 15:15:58 UTC (rev 26795)
@@ -15,12 +15,11 @@
$Id$
"""
-from zope.exceptions import ZopeError, IZopeError
-from zope.interface import implements
+from zope.interface import implements, Interface
-class IDuplicationError(IZopeError):
+class IDuplicationError(Interface):
pass
-class DuplicationError(ZopeError):
+class DuplicationError(Exception):
"""A duplicate registration was attempted"""
implements(IDuplicationError)
Modified: Zope3/trunk/src/zope/exceptions/_notfounderror.py
===================================================================
--- Zope3/trunk/src/zope/exceptions/_notfounderror.py 2004-07-27 14:58:39 UTC (rev 26794)
+++ Zope3/trunk/src/zope/exceptions/_notfounderror.py 2004-07-27 15:15:58 UTC (rev 26795)
@@ -15,14 +15,13 @@
$Id$
"""
-from zope.exceptions import ZopeError, IZopeError
from zope.interface.common.interfaces import IKeyError
from zope.interface import implements
-class INotFoundError(IZopeError, IKeyError):
+class INotFoundError(IKeyError):
pass
-class NotFoundError(ZopeError, KeyError):
+class NotFoundError(KeyError):
"""A resource could not be found.
"""
implements(INotFoundError)
Deleted: Zope3/trunk/src/zope/exceptions/_zope_error.py
===================================================================
--- Zope3/trunk/src/zope/exceptions/_zope_error.py 2004-07-27 14:58:39 UTC (rev 26794)
+++ Zope3/trunk/src/zope/exceptions/_zope_error.py 2004-07-27 15:15:58 UTC (rev 26795)
@@ -1,26 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""Base class for Zope application errors.
-
-$Id$
-"""
-from zope.interface.common.interfaces import IException
-from zope.interface import implements
-
-class IZopeError(IException):
- pass
-
-class ZopeError(Exception):
- """Generic base class for Zope errors."""
- implements(IZopeError)
More information about the Zope3-Checkins
mailing list