[Zope-dev] Zope 2.1.1 DTML Try/Except Question

Clayton Miller cmille9@hotmail.com
Tue, 04 Jan 2000 03:00:02 GMT


I am using Zope 2.1.1 and I am having trouble using DTML-TRY & EXCEPT
statements. This is my first time using this feature, so I apologize
if I am doing something dumb.

First a look at a code fragment:

dtml-try
   dtml-call "DB_DoSomething(var1=var1)"
   dtml-except
      attempt to caught all exceptions
      Error Type: dtml-var error_type value: dtml-var error_value
/dtml-try

NOTE: I do have <> used around all of the above dtml- statements. I did not 
wish to have this code interpreted.

Outcome: I get a name error for DB_DoSomething. However, this SQL Method is 
in the same directory as the calling DTML Method. I have even tried:

dtml-try
  dtml-with REQUEST     or dtml-with _
    dtml-call "DB_DoSomething(var1=var1)"
    dtml-except
       Show error type and value
  /dtml-with
/dtml-try

The dtml-with does not work with either the REQUEST or _. I get a name error 
for REQUEST or _ depending on which one I tried! What am I doing wrong?
Thanks,
Clayton.
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com