RE: [Zope] handling exceptions in DTML
Jordan wrote:
Is anyone working on patches to address this in the near future? I'd be willing to take a stab at it myself if not.
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. --Paul
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
"Jordan B. Baker" wrote:
<!--#try-->
...
<!--#except-->
The exception was <!--#var err-->
<!--#/try-->
...
Anyone have more ideas?
Maybe something like this for the version 2.3 :-) <!--#try--> ... <!--#except KeyError--> ... <!--#except ValueError IndexError--> ... <!--#finally--> ... <!--#/try--> regards, -- Paulo Eduardo Neves PUC-Rio de Janeiro Pager: Central: 292-4499 cod. 213 99 64 ou use a URL: http://www.learn.fplf.org.br/neves/mensagempager.html
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.
What crack are you smoking and do you mind shipping some to CA? --------------------------------------------------- - Scott Robertson Phone: 714.972.2299 - - CodeIt Computing Fax: 714.972.2399 - - http://codeit.com - ---------------------------------------------------
participants (4)
-
Jordan B. Baker -
Paul Everitt -
Paulo Eduardo Neves -
Scott Robertson