Exception: MaxBotApi::TimeoutError

Inherits:
Error
  • Object
show all
Defined in:
lib/max_bot_api/errors.rb

Overview

Raised when the request times out.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(op:, reason: nil) ⇒ TimeoutError

Returns a new instance of TimeoutError.

Parameters:

  • op (String)

    operation name

  • reason (String, nil) (defaults to: nil)

    timeout reason



62
63
64
65
66
# File 'lib/max_bot_api/errors.rb', line 62

def initialize(op:, reason: nil)
  @op = op
  @reason = reason
  super(build_message)
end

Instance Attribute Details

#opObject (readonly)

Returns the value of attribute op.



58
59
60
# File 'lib/max_bot_api/errors.rb', line 58

def op
  @op
end

#reasonObject (readonly)

Returns the value of attribute reason.



58
59
60
# File 'lib/max_bot_api/errors.rb', line 58

def reason
  @reason
end

Instance Method Details

#timeout?Boolean

Returns:

  • (Boolean)


68
69
70
# File 'lib/max_bot_api/errors.rb', line 68

def timeout?
  true
end