SOLR-146: fix Solr::Response::Base.make_response raises misleading exception when response class exists but raises an exception on creation

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@505106 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Erik Hatcher 2007-02-09 00:46:40 +00:00
parent d0b674a2a8
commit cf8186165b
1 changed files with 4 additions and 2 deletions

View File

@ -31,10 +31,12 @@ class Solr::Response::Base
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