[Zope] handling exceptions in DTML
Jordan B. Baker
jbb@spyderlab.com
Wed, 24 Mar 1999 15:22:17 -0500 (EST)
On Wed, 24 Mar 1999, Paul Everitt wrote:
> Please, stab away! If you write the try DTML tag, we'll crown you
> Prince of Zope, or at least Most Honorable Potentate. Looks good on
> business cards and the girls really dig it.
Hey.. this isn't bad.. in writing even :)
Okay, I have a prototype of this written.. basically you can do the
following:
<!--#try-->
foo
bnar
<!--#var sgkjgdsjksdg-->
<!--#except-->
The exception was <!--#var err-->
<!--#/try-->
So, if an error occurs inside the first block, the second block is
rendered with err substituted for the variable (in this case it prints
exceptions.KeyError
This is pretty basic stuff, so I'm looking for ideas on where to take
this.
Anyone have more ideas?
-------
Jordan B. Baker -- jbb@spyderlab.com
weaving the web @ http://www.spyderlab.com