lib/blacklight/solr/repository.rb in blacklight-6.0.2 vs lib/blacklight/solr/repository.rb in blacklight-6.1.0
- old
+ new
@@ -10,11 +10,11 @@
doc_params = params.reverse_merge(blacklight_config.default_document_solr_params)
.reverse_merge(qt: blacklight_config.document_solr_request_handler)
.merge(blacklight_config.document_unique_id_param => id)
solr_response = send_and_receive blacklight_config.document_solr_path || blacklight_config.solr_path, doc_params
- raise Blacklight::Exceptions::RecordNotFound.new if solr_response.documents.empty?
+ raise Blacklight::Exceptions::RecordNotFound if solr_response.documents.empty?
solr_response
end
##
# Execute a search query against solr
@@ -43,12 +43,12 @@
Blacklight.logger.debug("Solr query: #{blacklight_config.http_method} #{path} #{solr_params.to_hash.inspect}")
Blacklight.logger.debug("Solr response: #{solr_response.inspect}") if defined?(::BLACKLIGHT_VERBOSE_LOGGING) and ::BLACKLIGHT_VERBOSE_LOGGING
solr_response
end
rescue Errno::ECONNREFUSED => e
- raise Blacklight::Exceptions::ECONNREFUSED.new("Unable to connect to Solr instance using #{connection.inspect}: #{e.inspect}")
+ raise Blacklight::Exceptions::ECONNREFUSED, "Unable to connect to Solr instance using #{connection.inspect}: #{e.inspect}"
rescue RSolr::Error::Http => e
- raise Blacklight::Exceptions::InvalidRequest.new(e.message)
+ raise Blacklight::Exceptions::InvalidRequest, e.message
end
protected
def build_connection