Commit 95653fda authored by Fred Drake's avatar Fred Drake

Fix spurious error in PageTemplates; no longer rely on the str() of exception

objects since the value of their str() is not part of their API, and can
vary between releases.
parent 291c4c73
......@@ -3,8 +3,12 @@
<title tal:content="string:Hello World!">This is the title</title>
</head>
<body>
<tal:block on-error="string:Error:${error/value}" replace="x" />
<tal:block on-error="string:Error:${error/value}">
<!-- These next two on-error expressions are very fragile; there's
not a lot we can do without fairly interesting exception
objects and not be subject to variations in the str() of the
exception object. -->
<tal:block on-error="string:Error:${error/lineno}" replace="x" />
<tal:block on-error="string:Error:${error/lineno}">
<p tal:content="x">p</p>
</tal:block>
<div tal:replace="structure string:&lt;hr /&gt;">rule</div>
......
......@@ -3,8 +3,12 @@
<title>Hello World!</title>
</head>
<body>
Error:x
Error:x
<!-- These next two on-error expressions are very fragile; there's
not a lot we can do without fairly interesting exception
objects and not be subject to variations in the str() of the
exception object. -->
Error:10
Error:11
<hr />
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment