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
3f5f47e1
Commit
3f5f47e1
authored
Apr 07, 2001
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
De-Zopeified error messages.
parent
6e06f6c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
lib/python/ZPublisher/HTTPResponse.py
lib/python/ZPublisher/HTTPResponse.py
+8
-8
No files found.
lib/python/ZPublisher/HTTPResponse.py
View file @
3f5f47e1
...
@@ -84,8 +84,8 @@
...
@@ -84,8 +84,8 @@
##############################################################################
##############################################################################
'''CGI Response Output formatter
'''CGI Response Output formatter
$Id: HTTPResponse.py,v 1.4
3 2001/02/12 18:54:50 brian
Exp $'''
$Id: HTTPResponse.py,v 1.4
4 2001/04/07 16:01:29 jim
Exp $'''
__version__
=
'$Revision: 1.4
3
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.4
4
$'
[
11
:
-
2
]
import
string
,
types
,
sys
,
regex
,
re
import
string
,
types
,
sys
,
regex
,
re
from
string
import
find
,
rfind
,
lower
,
upper
,
strip
,
split
,
join
,
translate
from
string
import
find
,
rfind
,
lower
,
upper
,
strip
,
split
,
join
,
translate
...
@@ -498,7 +498,7 @@ class HTTPResponse(BaseResponse):
...
@@ -498,7 +498,7 @@ class HTTPResponse(BaseResponse):
# XXX could this try to use standard_error_message somehow?
# XXX could this try to use standard_error_message somehow?
return ("""
\
return ("""
\
<HTML>
<HTML>
<HEAD><TITLE>
Zop
e Error</TITLE></HEAD>
<HEAD><TITLE>
Sit
e Error</TITLE></HEAD>
<BODY>
<BODY>
<TABLE BORDER="
0
" WIDTH="
100
%
">
<TABLE BORDER="
0
" WIDTH="
100
%
">
...
@@ -509,8 +509,8 @@ class HTTPResponse(BaseResponse):
...
@@ -509,8 +509,8 @@ class HTTPResponse(BaseResponse):
</TD>
</TD>
<TD WIDTH="
90
%
">
<TD WIDTH="
90
%
">
<H2>
Zop
e Error</H2>
<H2>
Sit
e Error</H2>
<P>
Zope has encountered an error
while publishing this resource.
<P>
An error was encountered
while publishing this resource.
</P>""" +
\
</P>""" +
\
"""
"""
<P><STRONG>%s</STRONG></P>
<P><STRONG>%s</STRONG></P>
...
@@ -544,7 +544,7 @@ class HTTPResponse(BaseResponse):
...
@@ -544,7 +544,7 @@ class HTTPResponse(BaseResponse):
self.setStatus(404)
self.setStatus(404)
raise 'NotFound',self._error_html(
raise 'NotFound',self._error_html(
"
Resource
not
found
",
"
Resource
not
found
",
"
Sorry
,
the
requested
Zope
resource
does
not
exist
.
<
p
>
" +
"
Sorry
,
the
requested
resource
does
not
exist
.
<
p
>
" +
"
Check
the
URL
and
try
again
.
<
p
>
" +
"
Check
the
URL
and
try
again
.
<
p
>
" +
"
\
n
<
!
--
\
n
%
s
\
n
-->
" % entry)
"
\
n
<
!
--
\
n
%
s
\
n
-->
" % entry)
...
@@ -562,7 +562,7 @@ class HTTPResponse(BaseResponse):
...
@@ -562,7 +562,7 @@ class HTTPResponse(BaseResponse):
if regex.match('^[A-Z_0-9]+$',name) >= 0:
if regex.match('^[A-Z_0-9]+$',name) >= 0:
raise 'InternalError', self._error_html(
raise 'InternalError', self._error_html(
"
Internal
Error
",
"
Internal
Error
",
"
Sorry
,
an
internal
error
occurred
in
this
Zope
resource
.
")
"
Sorry
,
an
internal
error
occurred
in
this
resource
.
")
raise 'BadRequest',self._error_html(
raise 'BadRequest',self._error_html(
"
Invalid
request
",
"
Invalid
request
",
...
@@ -661,7 +661,7 @@ class HTTPResponse(BaseResponse):
...
@@ -661,7 +661,7 @@ class HTTPResponse(BaseResponse):
elif
type
(
b
)
is
not
types
.
StringType
or
tag_search
(
b
)
is
None
:
elif
type
(
b
)
is
not
types
.
StringType
or
tag_search
(
b
)
is
None
:
tb
=
self
.
setBody
(
tb
=
self
.
setBody
(
(
str
(
t
),
(
str
(
t
),
'Sorry, a
Zop
e error occurred.<p>'
+
'Sorry, a
sit
e error occurred.<p>'
+
self
.
_traceback
(
t
,
v
,
tb
)),
self
.
_traceback
(
t
,
v
,
tb
)),
is_error
=
1
)
is_error
=
1
)
...
...
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