Exception: Droonga::Serf::Command::Failure

Inherits:
Error
  • Object
show all
Defined in:
lib/droonga/serf/command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(command_line, exit_status, output, error) ⇒ Failure

Returns a new instance of Failure.



26
27
28
29
30
31
32
33
34
35
# File 'lib/droonga/serf/command.rb', line 26

def initialize(command_line, exit_status, output, error)
  @command_line = command_line
  @exit_status = exit_status
  @output = output
  @error = error
  message = "Failed to run serf: (#{@exit_status}): "
  message << "#{@error.strip}[#{@output.strip}]: "
  message << @command_line.join(" ")
  super(message)
end

Instance Attribute Details

#command_lineObject (readonly)

Returns the value of attribute command_line.



25
26
27
# File 'lib/droonga/serf/command.rb', line 25

def command_line
  @command_line
end

#errorObject (readonly)

Returns the value of attribute error.



25
26
27
# File 'lib/droonga/serf/command.rb', line 25

def error
  @error
end

#exit_statusObject (readonly)

Returns the value of attribute exit_status.



25
26
27
# File 'lib/droonga/serf/command.rb', line 25

def exit_status
  @exit_status
end

#outputObject (readonly)

Returns the value of attribute output.



25
26
27
# File 'lib/droonga/serf/command.rb', line 25

def output
  @output
end