Exception: Rpush::RetryableError
- Inherits:
-
StandardError
- Object
- StandardError
- Rpush::RetryableError
- Defined in:
- lib/rpush/daemon/retryable_error.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(code, notification_id, description, response) ⇒ RetryableError
constructor
A new instance of RetryableError.
- #message ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(code, notification_id, description, response) ⇒ RetryableError
Returns a new instance of RetryableError.
5 6 7 8 9 10 |
# File 'lib/rpush/daemon/retryable_error.rb', line 5 def initialize(code, notification_id, description, response) @code = code @notification_id = notification_id @description = description @response = response end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
3 4 5 |
# File 'lib/rpush/daemon/retryable_error.rb', line 3 def code @code end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
3 4 5 |
# File 'lib/rpush/daemon/retryable_error.rb', line 3 def description @description end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
3 4 5 |
# File 'lib/rpush/daemon/retryable_error.rb', line 3 def response @response end |
Instance Method Details
#message ⇒ Object
16 17 18 |
# File 'lib/rpush/daemon/retryable_error.rb', line 16 def "Retryable error for #{@notification_id}, received error #{@code} (#{@description}) - retry after #{@response.header['retry-after']}" end |
#to_s ⇒ Object
12 13 14 |
# File 'lib/rpush/daemon/retryable_error.rb', line 12 def to_s end |