mirror of https://github.com/apache/lucene.git
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:
parent
d0b674a2a8
commit
cf8186165b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue