[Zope] catching exceptions in zpt
David Bear
david.bear at asu.edu
Mon Mar 10 16:55:27 EDT 2008
I'm trying to do something like this in a zpt
<meta tal:define="global target python:here.mysript(request.target) |
nothing" />
however, if my request did not have ?target=blah I get an attributeError
because of course the request has not parameter called target. I assumed that
the pipe 'or nothing' would handle an equivalent except AttributeError block
but it doesnt.
how can I put in my zpt a way to catch if request has no attribute?
--
David Bear
College of Public Programs/ASU
411 N Central, Phoenix, AZ 85004
More information about the Zope
mailing list