Exception: TIMEx::TimeoutError
- Inherits:
-
StandardError
- Object
- StandardError
- TIMEx::TimeoutError
- Defined in:
- lib/timex/expired.rb
Overview
Instance Attribute Summary collapse
-
#deadline_ms ⇒ Object
readonly
Returns the value of attribute deadline_ms.
-
#elapsed_ms ⇒ Object
readonly
Returns the value of attribute elapsed_ms.
-
#original ⇒ Object
readonly
Returns the value of attribute original.
-
#strategy ⇒ Object
readonly
Returns the value of attribute strategy.
Class Method Summary collapse
-
.from(expired) ⇒ TimeoutError
Builds a TimeoutError from an Expired, preserving message and metrics.
Instance Method Summary collapse
-
#initialize(message = "deadline expired", strategy: nil, deadline_ms: nil, elapsed_ms: nil, original: nil) ⇒ TimeoutError
constructor
A new instance of TimeoutError.
Constructor Details
#initialize(message = "deadline expired", strategy: nil, deadline_ms: nil, elapsed_ms: nil, original: nil) ⇒ TimeoutError
Returns a new instance of TimeoutError.
67 68 69 70 71 72 73 |
# File 'lib/timex/expired.rb', line 67 def initialize( = "deadline expired", strategy: nil, deadline_ms: nil, elapsed_ms: nil, original: nil) super() @strategy = strategy @deadline_ms = deadline_ms @elapsed_ms = elapsed_ms @original = original end |
Instance Attribute Details
#deadline_ms ⇒ Object (readonly)
Returns the value of attribute deadline_ms.
46 47 48 |
# File 'lib/timex/expired.rb', line 46 def deadline_ms @deadline_ms end |
#elapsed_ms ⇒ Object (readonly)
Returns the value of attribute elapsed_ms.
46 47 48 |
# File 'lib/timex/expired.rb', line 46 def elapsed_ms @elapsed_ms end |
#original ⇒ Object (readonly)
Returns the value of attribute original.
46 47 48 |
# File 'lib/timex/expired.rb', line 46 def original @original end |
#strategy ⇒ Object (readonly)
Returns the value of attribute strategy.
46 47 48 |
# File 'lib/timex/expired.rb', line 46 def strategy @strategy end |
Class Method Details
.from(expired) ⇒ TimeoutError
Builds a TIMEx::TimeoutError from an Expired, preserving message and metrics.
52 53 54 55 56 57 58 59 60 |
# File 'lib/timex/expired.rb', line 52 def self.from(expired) new( expired., strategy: expired.strategy, deadline_ms: expired.deadline_ms, elapsed_ms: expired.elapsed_ms, original: expired ) end |