[Zope] error_type not defined? SURELY YOU JEST...

Ben Ocean zope@thewebsons.com
Mon, 10 Dec 2001 06:10:00 -0800


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