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 @@ ...@@ -3,8 +3,12 @@
<title tal:content="string:Hello World!">This is the title</title> <title tal:content="string:Hello World!">This is the title</title>
</head> </head>
<body> <body>
<tal:block on-error="string:Error:${error/value}" replace="x" /> <!-- These next two on-error expressions are very fragile; there's
<tal:block on-error="string:Error:${error/value}"> 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> <p tal:content="x">p</p>
</tal:block> </tal:block>
<div tal:replace="structure string:&lt;hr /&gt;">rule</div> <div tal:replace="structure string:&lt;hr /&gt;">rule</div>
......
...@@ -3,8 +3,12 @@ ...@@ -3,8 +3,12 @@
<title>Hello World!</title> <title>Hello World!</title>
</head> </head>
<body> <body>
Error:x <!-- These next two on-error expressions are very fragile; there's
Error:x 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 /> <hr />
</body> </body>
</html> </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