Exception: Push::DeliveryError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/push/daemon/delivery_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, message_id, description, source, notify = true) ⇒ DeliveryError

Returns a new instance of DeliveryError.



5
6
7
8
9
10
11
# File 'lib/push/daemon/delivery_error.rb', line 5

def initialize(code, message_id, description, source, notify = true)
  @code = code
  @message_id = message_id
  @description = description
  @source = source
  @notify = notify
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



3
4
5
# File 'lib/push/daemon/delivery_error.rb', line 3

def code
  @code
end

#descriptionObject (readonly)

Returns the value of attribute description.



3
4
5
# File 'lib/push/daemon/delivery_error.rb', line 3

def description
  @description
end

#notifyObject (readonly)

Returns the value of attribute notify.



3
4
5
# File 'lib/push/daemon/delivery_error.rb', line 3

def notify
  @notify
end

Instance Method Details

#messageObject



13
14
15
# File 'lib/push/daemon/delivery_error.rb', line 13

def message
  "Unable to deliver message #{@message_id}, received #{@source} error #{@code} (#{@description})"
end