[Zope] How manage error with zsql

Dieter Maurer dieter at handshake.de
Thu Dec 11 13:45:57 EST 2008


Miguel Beltran R. wrote at 2008-12-9 13:42 -0600:
>is possible have a general except and inside show what type is?
>in dtml was
><dtml-try>
>...
><dtml-except>
>  type:<dtml-var error_type>  value: <dtml-var error_value>
></dtml-try>

According to the documentation (--> embedded online documentation (aka "Help")
--> Zope Help --> DTML Reference --> try), this is possible.

Note, however, that unqualified "try ... except ..." is dangerous,
everywhere, both in Python as well as in DTML.


Formerly, exceptions have been strings. Nowadays, exceptions are
class instances. I am not sure whether the DTML-try already
support non string exceptions.
If you observe problems, then this might be the reason.



-- 
Dieter


More information about the Zope mailing list