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
6f90058b
Commit
6f90058b
authored
Nov 12, 2001
by
Evan Simpson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Subclass RuntimeError to allow it to be distinguished from Python problems.
parent
d3458376
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
lib/python/Products/PageTemplates/PageTemplate.py
lib/python/Products/PageTemplates/PageTemplate.py
+6
-2
No files found.
lib/python/Products/PageTemplates/PageTemplate.py
View file @
6f90058b
...
...
@@ -87,7 +87,7 @@
HTML- and XML-based template objects using TAL, TALES, and METAL.
"""
__version__
=
'$Revision: 1.1
6
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
7
$'
[
11
:
-
2
]
import
os
,
sys
,
traceback
,
pprint
from
TAL.TALParser
import
TALParser
...
...
@@ -144,7 +144,7 @@ class PageTemplate(Base):
def
pt_render
(
self
,
source
=
0
,
extra_context
=
{}):
"""Render this Page Template"""
if
self
.
_v_errors
:
raise
RuntimeError
,
'Page Template %s has errors.'
%
self
.
id
raise
PT
RuntimeError
,
'Page Template %s has errors.'
%
self
.
id
output
=
StringIO
()
c
=
self
.
pt_getContext
()
c
.
update
(
extra_context
)
...
...
@@ -235,3 +235,7 @@ class _ModuleImporter:
return
mod
ModuleImporter
=
_ModuleImporter
()
class
PTRuntimeError
(
RuntimeError
):
'''The Page Template has template errors that prevent it from rendering.'''
pass
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