Exception: Pushr::Daemon::DeliveryError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of DeliveryError.



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

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

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



4
5
6
# File 'lib/pushr/daemon/delivery_error.rb', line 4

def code
  @code
end

#descriptionObject (readonly)

Returns the value of attribute description.



4
5
6
# File 'lib/pushr/daemon/delivery_error.rb', line 4

def description
  @description
end

#notifyObject (readonly)

Returns the value of attribute notify.



4
5
6
# File 'lib/pushr/daemon/delivery_error.rb', line 4

def notify
  @notify
end

#sourceObject (readonly)

Returns the value of attribute source.



4
5
6
# File 'lib/pushr/daemon/delivery_error.rb', line 4

def source
  @source
end

Instance Method Details

#messageObject



14
15
16
# File 'lib/pushr/daemon/delivery_error.rb', line 14

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