Exception: Yapo::Helpers::CustomErrors::TimeoutError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/yapo/helpers/custom_errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(command, timeout, result, *args) ⇒ TimeoutError

Returns a new instance of TimeoutError.



68
69
70
71
72
73
74
75
# File 'lib/yapo/helpers/custom_errors.rb', line 68

def initialize(command, timeout, result, *args)
  @command = command
  @params = *args
  @timeout = timeout
  @out = result.out
  @err = result.err
  super(message)
end

Instance Attribute Details

#errObject (readonly)

Returns the value of attribute err.



66
67
68
# File 'lib/yapo/helpers/custom_errors.rb', line 66

def err
  @err
end

#outObject (readonly)

Returns the value of attribute out.



66
67
68
# File 'lib/yapo/helpers/custom_errors.rb', line 66

def out
  @out
end

#paramsObject (readonly)

Returns the value of attribute params.



66
67
68
# File 'lib/yapo/helpers/custom_errors.rb', line 66

def params
  @params
end

Instance Method Details

#messageObject



77
78
79
80
81
82
# File 'lib/yapo/helpers/custom_errors.rb', line 77

def message
  "Running \"#{@command}\" timed out after #{@timeout} seconds.\n" \
  "  params: #{@params}\n" \
  "  std out: #{@out}\n" \
  "  std err: #{@err}\n"
end