Exception: BBK::AMQP::Publisher::ReturnError
- Inherits:
-
StandardError
- Object
- StandardError
- BBK::AMQP::Publisher::ReturnError
- Defined in:
- lib/bbk/amqp/publisher.rb
Overview
Исключение используемое для reject промиса - так удобнее в рамках работы с ними (проще вернуть исключение, иначе если вернуть hash то будет считать что это множество исключений)
Instance Attribute Summary collapse
-
#basic_return ⇒ Object
readonly
Returns the value of attribute basic_return.
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#exchange ⇒ Object
readonly
Returns the value of attribute exchange.
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
Instance Method Summary collapse
-
#initialize(exchange:, basic_return:, properties:, body:, **kwargs) ⇒ ReturnError
constructor
A new instance of ReturnError.
Constructor Details
#initialize(exchange:, basic_return:, properties:, body:, **kwargs) ⇒ ReturnError
Returns a new instance of ReturnError.
30 31 32 33 34 35 36 |
# File 'lib/bbk/amqp/publisher.rb', line 30 def initialize(exchange:, basic_return:, properties: , body: , **kwargs) @exchange = exchange @basic_return = basic_return @properties = properties @body = body super("Error on public message(headers=#{properties[:headers]}) to exchange(#{exchange.name}): #{basic_return}") end |
Instance Attribute Details
#basic_return ⇒ Object (readonly)
Returns the value of attribute basic_return.
28 29 30 |
# File 'lib/bbk/amqp/publisher.rb', line 28 def basic_return @basic_return end |
#body ⇒ Object (readonly)
Returns the value of attribute body.
28 29 30 |
# File 'lib/bbk/amqp/publisher.rb', line 28 def body @body end |
#exchange ⇒ Object (readonly)
Returns the value of attribute exchange.
28 29 30 |
# File 'lib/bbk/amqp/publisher.rb', line 28 def exchange @exchange end |
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
28 29 30 |
# File 'lib/bbk/amqp/publisher.rb', line 28 def properties @properties end |