[ZWeb] "Token 'ATOM' required, 'EOF' found" error in zopeorg

Andrew Sawyers andrew at zope.com
Tue Jan 18 17:01:51 EST 2005


Chris Withers wrote:
> Andrew Sawyers wrote:
> 
>>> This has long been a bugbear of mine. Yes, it is an invalid search 
>>> phrase, but should end users really see exceptions raised because 
>>> they accidentally tried to use a piece of ZCTextIndex functionality 
>>> that they didn't even know existed?
>>>
>> You can catch this in a python script handler the searches go to.....
>> This is how I've managed it in the past.
>> Andrew
> 
> 
> How? In most released versions of Zope, you can't import these 
> exceptions to catch them in untrusted code...
> 
> cheers,
> 
> Chris
> 
Not by carching an exception; by intercepting the search query and 
looking for incorrect structure before passing it off to the catalog, 
thus the 'handler the searches go to....' in the above.

Andrew

-- 
Zope Managed Hosting
Systems Administrator/Software Engineer
Zope Corporation
(540) 361-1700


More information about the Zope-web mailing list