Module: RSolr::Error::SolrContext
Instance Attribute Summary collapse
-
#request ⇒ Object
Returns the value of attribute request.
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
Methods included from URICleanup
Instance Attribute Details
#request ⇒ Object
Returns the value of attribute request.
18 19 20 |
# File 'lib/rsolr/error.rb', line 18 def request @request end |
#response ⇒ Object
Returns the value of attribute response.
18 19 20 |
# File 'lib/rsolr/error.rb', line 18 def response @response end |
Instance Method Details
#to_s ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/rsolr/error.rb', line 20 def to_s m = "#{super.to_s}" if response m << " - #{response[:status]} #{Http::STATUS_CODES[response[:status].to_i]}" details = parse_solr_error_response response[:body] m << "\nError: #{details}\n" if details end p = "\nURI: #{clean_uri(request[:uri]).to_s}" p << "\nRequest Headers: #{request[:headers].inspect}" if request[:headers] p << "\nRequest Data: #{request[:data].inspect}" if request[:data] p << "\n" p << "\nBacktrace: " + self.backtrace[0..10].join("\n") m << p m end |