Class: LogStash::ConvergeResult::FailedAction

Inherits:
ActionResult
  • Object
show all
Defined in:
lib/logstash/converge_result.rb

Instance Attribute Summary collapse

Attributes inherited from ActionResult

#executed_at

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ActionResult

create

Constructor Details

#initialize(message, backtrace = nil) ⇒ FailedAction

Returns a new instance of FailedAction.



35
36
37
38
39
40
# File 'lib/logstash/converge_result.rb', line 35

def initialize(message, backtrace = nil)
  super()

  @message = message
  @backtrace = backtrace
end

Instance Attribute Details

#backtraceObject (readonly)

Returns the value of attribute backtrace.



33
34
35
# File 'lib/logstash/converge_result.rb', line 33

def backtrace
  @backtrace
end

#messageObject (readonly)

Returns the value of attribute message.



33
34
35
# File 'lib/logstash/converge_result.rb', line 33

def message
  @message
end

Class Method Details

.from_action(action, action_result) ⇒ Object



46
47
48
# File 'lib/logstash/converge_result.rb', line 46

def self.from_action(action, action_result)
  FailedAction.new("Could not execute action: #{action}, action_result: #{action_result}")
end

.from_exception(exception) ⇒ Object



42
43
44
# File 'lib/logstash/converge_result.rb', line 42

def self.from_exception(exception)
  FailedAction.new(exception.message, exception.backtrace)
end

Instance Method Details

#successful?Boolean

Returns:

  • (Boolean)


50
51
52
# File 'lib/logstash/converge_result.rb', line 50

def successful?
  false
end