Exception: Promiscuous::Error::Publisher
- Defined in:
- lib/promiscuous/error/publisher.rb
Instance Attribute Summary collapse
-
#inner ⇒ Object
Returns the value of attribute inner.
-
#instance ⇒ Object
Returns the value of attribute instance.
-
#payload ⇒ Object
Returns the value of attribute payload.
Instance Method Summary collapse
-
#initialize(inner, options = {}) ⇒ Publisher
constructor
A new instance of Publisher.
- #message ⇒ Object (also: #to_s)
Constructor Details
#initialize(inner, options = {}) ⇒ Publisher
Returns a new instance of Publisher.
4 5 6 7 8 9 10 11 |
# File 'lib/promiscuous/error/publisher.rb', line 4 def initialize(inner, ={}) super(nil) inner = inner.inner if inner.is_a?(Promiscuous::Error::Publisher) set_backtrace(inner.backtrace) self.inner = inner self.instance = [:instance] self.payload = [:payload] end |
Instance Attribute Details
#inner ⇒ Object
Returns the value of attribute inner.
2 3 4 |
# File 'lib/promiscuous/error/publisher.rb', line 2 def inner @inner end |
#instance ⇒ Object
Returns the value of attribute instance.
2 3 4 |
# File 'lib/promiscuous/error/publisher.rb', line 2 def instance @instance end |
#payload ⇒ Object
Returns the value of attribute payload.
2 3 4 |
# File 'lib/promiscuous/error/publisher.rb', line 2 def payload @payload end |
Instance Method Details
#message ⇒ Object Also known as: to_s
13 14 15 16 17 18 |
# File 'lib/promiscuous/error/publisher.rb', line 13 def msg = "#{inner.class}: #{inner.}" msg = "#{msg} while publishing #{instance.inspect}" if instance msg = "#{msg} payload: #{payload}" if payload msg end |