Can not rescue ferret exception. What is wrong?

Hi,

I have a big index and wildcard query raises an exception. That is all
right. The problem is I can not rescue this exception and it bombs right
to user page. Why?

I am on Linux. Ferret 0.9.3 with C extentions.

class A
def self.b
Book.index.search(‘isbn:00*’)
rescue
puts ‘ok’
end
end
=> nil
A.b
(irb):3:in search': : Error occured at <q_prefix.c>:54 (Exception) Error: exception 6 not handled: Too many clauses from (irb):3:in b’
from (irb):8:in irb_binding' from /usr/lib/ruby/1.8/irb/workspace.rb:52:in irb_binding’
from /usr/lib/ruby/1.8/irb/workspace.rb:52


Sergei S.
Red Leaf Software LLC
web: http://redleafsoft.com

On Fri, Jun 23, 2006 at 05:23:53PM +0200, Sergei S. wrote:

Hi,

I have a big index and wildcard query raises an exception. That is all
right. The problem is I can not rescue this exception and it bombs right
to user page. Why?

the errors raised by ferret aren’t subclasses of StandardError, and
‘rescue’ without arguments defaults to ‘rescue StandardError’

‘rescue Exception’ will rescue from all possible errors, including those
from Ferret.

regards,
Jens


webit! Gesellschaft für neue Medien mbH www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer [email protected]
Schnorrstraße 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66