Exception: Groonga::Client::ErrorResponse

Inherits:
Error
  • Object
show all
Defined in:
lib/groonga/client/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ ErrorResponse

Returns a new instance of ErrorResponse.



24
25
26
27
28
29
30
31
32
33
34
# File 'lib/groonga/client/error.rb', line 24

def initialize(response)
  @response = response
  command = @response.command
  status_code = @response.status_code
  error_message = @response.error_message
  message = "failed to execute: "
  message << "#{command.command_name}: #{status_code}: "
  message << "<#{error_message}>: "
  message << command.to_command_format
  super(message)
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



23
24
25
# File 'lib/groonga/client/error.rb', line 23

def response
  @response
end