Exception: JetstreamBridge::BatchPublishError
- Inherits:
-
PublishError
- Object
- StandardError
- Error
- PublishError
- JetstreamBridge::BatchPublishError
- Defined in:
- lib/jetstream_bridge/errors.rb
Instance Attribute Summary collapse
-
#failed_events ⇒ Object
readonly
Returns the value of attribute failed_events.
-
#successful_count ⇒ Object
readonly
Returns the value of attribute successful_count.
Attributes inherited from PublishError
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(message = nil, failed_events: [], successful_count: 0, context: {}) ⇒ BatchPublishError
constructor
A new instance of BatchPublishError.
Constructor Details
#initialize(message = nil, failed_events: [], successful_count: 0, context: {}) ⇒ BatchPublishError
Returns a new instance of BatchPublishError.
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/jetstream_bridge/errors.rb', line 41 def initialize( = nil, failed_events: [], successful_count: 0, context: {}) @failed_events = failed_events @successful_count = successful_count super( , context: context.merge( failed_count: failed_events.size, successful_count: successful_count ) ) end |
Instance Attribute Details
#failed_events ⇒ Object (readonly)
Returns the value of attribute failed_events.
39 40 41 |
# File 'lib/jetstream_bridge/errors.rb', line 39 def failed_events @failed_events end |
#successful_count ⇒ Object (readonly)
Returns the value of attribute successful_count.
39 40 41 |
# File 'lib/jetstream_bridge/errors.rb', line 39 def successful_count @successful_count end |