lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject svn commit: r505106 - /lucene/solr/trunk/client/ruby/solrb/lib/solr/response/base.rb
Date Fri, 09 Feb 2007 00:46:41 GMT
Author: ehatcher
Date: Thu Feb  8 16:46:40 2007
New Revision: 505106

URL: http://svn.apache.org/viewvc?view=rev&rev=505106
Log:
SOLR-146: fix Solr::Response::Base.make_response raises misleading exception when response
class exists but raises an exception on creation

Modified:
    lucene/solr/trunk/client/ruby/solrb/lib/solr/response/base.rb

Modified: lucene/solr/trunk/client/ruby/solrb/lib/solr/response/base.rb
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/client/ruby/solrb/lib/solr/response/base.rb?view=diff&rev=505106&r1=505105&r2=505106
==============================================================================
--- lucene/solr/trunk/client/ruby/solrb/lib/solr/response/base.rb (original)
+++ lucene/solr/trunk/client/ruby/solrb/lib/solr/response/base.rb Thu Feb  8 16:46:40 2007
@@ -31,10 +31,12 @@
     
     begin
       klass = eval(request.class.name.sub(/Request/,'Response'))
-      klass.new(raw)
-    rescue
+    rescue NameError
       raise Solr::Exception.new("unknown request type: #{request.class}")
+    else
+      klass.new(raw)
     end
+    
   end
 
 end



Mime
View raw message