-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Move UserError to zope.exceptions. (While at it, restructure zope.exceptions a little bit).
- Loading branch information
0 parents
commit c99f2d9
Showing
2 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<zope:configure | ||
xmlns:zope="http://namespaces.zope.org/zope" | ||
xmlns="http://namespaces.zope.org/browser"> | ||
|
||
<page | ||
for="zope.interface.common.interfaces.IException" | ||
name="index.html" | ||
template="systemerror.pt" | ||
class="..systemerror.SystemErrorView" | ||
permission="zope.Public" | ||
/> | ||
|
||
<page | ||
for="zope.exceptions.INotFoundError" | ||
name="index.html" | ||
template="systemerror.pt" | ||
class="..systemerror.SystemErrorView" | ||
permission="zope.Public" | ||
/> | ||
|
||
<page | ||
for="zope.security.interfaces.IUnauthorized" | ||
name="index.html" | ||
permission="zope.Public" | ||
class=".unauthorized.Unauthorized" | ||
/> | ||
|
||
<zope:adapter factory=".unauthorized.default_template" name="default" /> | ||
|
||
<page | ||
for="zope.exceptions.interfaces.IUserError" | ||
name="index.html" | ||
permission="zope.Public" | ||
template="user.pt" | ||
class=".user.UserErrorView" | ||
/> | ||
|
||
<page | ||
for="zope.publisher.interfaces.INotFound" | ||
name="index.html" | ||
permission="zope.Public" | ||
template="notfound.pt" | ||
class=".notfound.NotFound" | ||
/> | ||
|
||
</zope:configure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
############################################################################## | ||
# Copyright (c) 2003 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. | ||
############################################################################## | ||
"""General exceptions | ||
$Id$ | ||
""" | ||
__docformat__ = 'restructuredtext' | ||
|
||
from zope.interface import Interface, implements | ||
|
||
############################################################################## | ||
# BBB 2006/04/03 - to be removed after 12 months | ||
|
||
import zope.deferredimport | ||
zope.deferredimport.deprecated( | ||
"UserError has been moved to zope.exceptions.interfaces. This " | ||
"reference will be removed in Zope 3.5.", | ||
UserError = 'zope.exceptions.interfaces:UserError', | ||
IUserError = 'zope.exceptions.interfaces:IUserError', | ||
) | ||
|
||
# | ||
############################################################################## | ||
|
||
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 | ||
""" |