Sergei Serdyuk
2006-Jun-23 15:23 UTC
[Ferret-talk] 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 Serdyuk Red Leaf Software LLC web: http://redleafsoft.com -- Posted via http://www.ruby-forum.com/.
Jens Kraemer
2006-Jun-27 06:32 UTC
[Ferret-talk] Can not rescue ferret exception. What is wrong?
On Fri, Jun 23, 2006 at 05:23:53PM +0200, Sergei Serdyuk 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 kraemer at webit.de Schnorrstra?e 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66