Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
6d54e97b
Commit
6d54e97b
authored
Sep 08, 2016
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-use `HTTPExcpeption.body_template` in httpexceptions middleware.
parent
665b64e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
31 deletions
+1
-31
src/ZPublisher/httpexceptions.py
src/ZPublisher/httpexceptions.py
+1
-31
No files found.
src/ZPublisher/httpexceptions.py
View file @
6d54e97b
...
...
@@ -17,36 +17,6 @@ from zExceptions import (
InternalError
,
)
ERROR_HTML
=
"""
\
<!DOCTYPE html>
<html>
<head>
<title>Site Error</title>
<meta charset="utf-8" />
</head>
<body bgcolor="#FFFFFF">
<h2>Site Error</h2>
<p>An error was encountered while publishing this resource.
</p>
<p><strong>Sorry, a site error occurred.</strong></p>
%s
<hr noshade="noshade"/>
<p>Troubleshooting Suggestions</p>
<ul>
<li>The URL may be incorrect.</li>
<li>The parameters passed to this resource may be incorrect.</li>
<li>A resource that this resource relies on may be
encountering an error.</li>
</ul>
<p>If the error persists please contact the site maintainer.
Thank you for your patience.
</p>
</body></html>"""
class
HTTPExceptionHandler
(
object
):
...
...
@@ -64,7 +34,7 @@ class HTTPExceptionHandler(object):
def
catch_all_response
(
self
,
exc
):
response
=
InternalError
()
response
.
setBody
(
ERROR_HTML
%
repr
(
exc
)
)
response
.
detail
=
repr
(
exc
)
return
response
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment