summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Howitz <mh@gocept.com>2009-05-18 17:02:53 +0000
committerMichael Howitz <mh@gocept.com>2009-05-18 17:02:53 +0000
commit694ae3eb018c4e39c101aeb020848eb8ab620639 (patch)
tree9dee9465153d83261c63cd144e5deae0b44143fc /src
parenta7b035e81acbdabba154caee2566ce0676128ed2 (diff)
downloadzope-browser-694ae3eb018c4e39c101aeb020848eb8ab620639.tar.gz
- Moved ``ISystemErrorView`` interface here from
``zope.app.exception`` to break undesirable dependencies. - Fixed home page and author's e-mail address. - Added doctests to long_description.
Diffstat (limited to 'src')
-rw-r--r--src/zope/browser/README.txt23
-rw-r--r--src/zope/browser/interfaces.py12
2 files changed, 25 insertions, 10 deletions
diff --git a/src/zope/browser/README.txt b/src/zope/browser/README.txt
index b387a55..5bb99b4 100644
--- a/src/zope/browser/README.txt
+++ b/src/zope/browser/README.txt
@@ -6,8 +6,6 @@ Views adapt both a context and a request.
There is not much we can test except that ``IView`` is importable
and an interface:
-.. doctest::
-
>>> from zope.interface import Interface
>>> from zope.browser.interfaces import IView
>>> Interface.providedBy(IView)
@@ -22,8 +20,6 @@ as distinct from WebDAV, FTP, XML-RPC, etc.).
There is not much we can test except that ``IBrowserView`` is importable
and an interface derived from ``IView``:
-.. doctest::
-
>>> from zope.interface import Interface
>>> from zope.browser.interfaces import IBrowserView
>>> Interface.providedBy(IBrowserView)
@@ -39,8 +35,6 @@ Adding views manage how newly-created items get added to containers.
There is not much we can test except that ``IAdding`` is importable
and an interface derived from ``IBrowserView``:
-.. doctest::
-
>>> from zope.interface import Interface
>>> from zope.browser.interfaces import IAdding
>>> Interface.providedBy(IBrowserView)
@@ -63,9 +57,22 @@ possible to share them without undesirable dependencies.
There is not much we can test except that ITerms is importable
and an interface:
-.. doctest::
-
>>> from zope.interface import Interface
>>> from zope.browser.interfaces import ITerms
>>> Interface.providedBy(ITerms)
True
+
+ISystemErrorView
+----------------
+
+Views providing this interface can classify their contexts as system
+errors. These errors can be handled in a special way (e. g. more
+detailed logging).
+
+There is not much we can test except that ISystemErrorView is importable
+and an interface:
+
+ >>> from zope.interface import Interface
+ >>> from zope.browser.interfaces import ISystemErrorView
+ >>> Interface.providedBy(ISystemErrorView)
+ True
diff --git a/src/zope/browser/interfaces.py b/src/zope/browser/interfaces.py
index 6588890..efa5c80 100644
--- a/src/zope/browser/interfaces.py
+++ b/src/zope/browser/interfaces.py
@@ -26,7 +26,7 @@ class IView(Interface):
class IBrowserView(IView):
""" Views which are specialized for requests from a browser
-
+
o Such views are distinct from those geerated via WebDAV, FTP, XML-RPC,
etc..
"""
@@ -40,7 +40,7 @@ class IAdding(IBrowserView):
"""Add content object to context.
Add using the name in `contentName`.
-
+
Return the added object in the context of its container.
If `contentName` is already used in container, raise
@@ -99,3 +99,11 @@ class ITerms(Interface):
LookupError is raised if there isn't a value in the source.
"""
+
+class ISystemErrorView(Interface):
+ """Error views that can classify their contexts as system errors
+ """
+
+ def isSystemError():
+ """Return a boolean indicating whether the error is a system errror
+ """