Exception: Promiscuous::Error::Subscriber

Inherits:
Base
  • Object
show all
Defined in:
lib/promiscuous/error/subscriber.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(inner, options = {}) ⇒ Subscriber

Returns a new instance of Subscriber.



4
5
6
7
8
9
# File 'lib/promiscuous/error/subscriber.rb', line 4

def initialize(inner, options={})
  super(nil)
  set_backtrace(inner.backtrace)
  self.inner = inner
  self.payload = options[:payload]
end

Instance Attribute Details

#innerObject

Returns the value of attribute inner.



2
3
4
# File 'lib/promiscuous/error/subscriber.rb', line 2

def inner
  @inner
end

#payloadObject

Returns the value of attribute payload.



2
3
4
# File 'lib/promiscuous/error/subscriber.rb', line 2

def payload
  @payload
end

Instance Method Details

#messageObject Also known as: to_s



11
12
13
# File 'lib/promiscuous/error/subscriber.rb', line 11

def message
  "#{inner.class}: #{inner.message} while processing #{payload}"
end