error_type not defined? SURELY YOU JEST...
Hi; I have this code: <dtml-if expr="URL[-(_.len('_frame')):]=='_frame'"> <dtml-call "SESSION.set('select_blueline_temp',select_blueline(_.None,_))"> <dtml-if expr="error_type == 'SessionNotFoundError'"> <dtml-return happysession_exception> <dtml-else> <dtml-return index_frame> </dtml-if> </dtml-if> that produces a traceback stating *global error_type is not defined*. Huh? I thought this was part of the distro! What do? TIA, BenO
Ben Ocean wrote:
that produces a traceback stating *global error_type is not defined*. Huh? I thought this was part of the distro! What do?
error_type is only returned by a (very few) things... wrap your lines in a <dtml-if error_type> or just drop the whole error_type bit, I've never had any useful info from it anyway. BTW, learn ZPT and stop hurting yourself... Chris
At 08:30 AM 12/10/01 +0000, you wrote:
Ben Ocean wrote:
that produces a traceback stating *global error_type is not defined*. Huh? I thought this was part of the distro! What do?
error_type is only returned by a (very few) things...
So, how do I get this HappySession to work? I've tried several things but there's a cache that must (occasionally) be cleared and the author recommends the error_type trick, which doesn't work for me: <dtml-if expr="URL[-(_.len('_frame')):]=='_frame'"> <dtml-try> <dtml-call "SESSION.set('select_blueline_temp',select_blueline(_.None,_))"> <dtml-except> <dtml-if expr="URL[-(_.len('_frame')):]=='index_frame'"> <dtml-return index2_frame> <dtml-else> <dtml-return index_frame> </dtml-if> </dtml-try> </dtml-if> or, alternatively... <dtml-comment> <dtml-if expr="URL[-(_.len('_frame')):]=='_frame'"> <dtml-call "SESSION.set('select_blueline_temp',select_blueline(_.None,_))"> <dtml-if expr="error_type == 'SessionNotFoundError'"> <dtml-return happysession_exception> <dtml-else> <dtml-return index_frame> </dtml-if> </dtml-if> </dtml-comment>
BTW, learn ZPT and stop hurting yourself...
Dunno enough about ZPT to understand how it would solve this problem, and from what I see of ZPT it appears to mainly be a way to separate the work of designers from programmers and I wear both hats, but sure, I'll check it out and see you on that list too ;) BenO
participants (2)
-
Ben Ocean -
Chris Withers