On Wed, Jul 12, 2000 at 04:05:08PM +1000, Curtis Maloney wrote:
> On Wed, 12 Jul 2000, Jonathan Desp wrote:
> > well if you use that script ? -->
> >
> > <meta http-equiv="refresh" content="0
> > ;URL=http://www.apple.com/enterprise/">
> >
> > It will fix your problem ?
> I think you've completely missed the point of my post.
> Firstly: I don't use those meta tags unless i absolutely have to.  The 
> redirection I have in place works fine, when it gets parsed.
> Secondly: My  problem is NOT redirecting the page.
> I added the redirect as a debuging tool, to find out if the DTML parser was 
> getting that far.  In case you've not noticed, any time you get an error, 
> that object is not rendered at all, instead the error report is put in its 
> place.
> What it showed me was that the page in question was not being parsed at all, 
> even tho the traceback shows it is.

You are seeing transactions at work. Your DTML Method _is_ being processed,
only an exception caused the publishing process to stop, roll back the
transaction, and return the error message to you.

DTML is not a linear language like ASP, it is not processed one line at a time
and bails out at the first error. DTML is parsed into an object tree when
entered, and this tree it then later on asked to render itself. An exception
in this tree will propagate down to the publishing level, and then turned into
an error response. So DTML is, like Python and Java, object oriented and
exception driven.

If you want to see how far a page gets, try using <dtml-try> blocks around
parts of your code. You can then catch the exception higher in the object
tree, and generate your own messages in reaction to this.

Martijn Pieters
| Software Engineer            mailto:[EMAIL PROTECTED]
| Digital Creations          http://www.digicool.com/
| Creators of Zope               http://www.zope.org/
| ZopeStudio: http://www.zope.org/Products/ZopeStudio

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to