[Zope] dtml-try... again?

Ausum Studio ausum_studio@hotmail.com
Sat, 23 Nov 2002 08:43:21 -0500


From: "Ken" <firerooster@netscape.net>

> If no one minds, I'll repeat my question more clearly:
>
> I am getting Key Errors, possible having to do with some remote HTTP
calls. I don't know how to provoke the problem, it 'just happens' (revised
estimate) 5-10% of the time.

I've seen those kind of problems at least in one other product that performs
remote HTTP calls, and it's probable that there's an issue related to what
happens to the existing persistent data when a remote call retrieves an
error.

If you can confirm that that is a recurrent behaviour on a fresh Zope
installation, you might report a bug to Kedai (KebasData's author).


Ausum



> The Key Error never happens twice, so requesting the page a second time
always works. I was tempted to use something like this:
>
> <dtml-try>
> <dtml-var "error_prone_method.view()">
> <dtml-except KeyError>
> <dtml-call "RESPONSE.redirect(URL)">
> </dtml-try>
>
> But I think there is something evil about this which could bring the world
as I know it to untimely end...
>
> Now I'm thinking 'Custom Error' as described in
zdp.zope.org/projects/zsnippet/snippets/ DTMLContent/CustomError
>
> 1.) Can this be used for a KeyError?
> 2.) How can I test this by provoking a KeyError?
>
> Thanks to all!
>
> Ken
>
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>