Exception: JetstreamBridge::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/jetstream_bridge/errors.rb

Overview

Base error for all JetStream Bridge errors.

Every error carries an optional context hash for structured diagnostics.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, context: {}) ⇒ Error

Returns a new instance of Error.

Parameters:

  • (defaults to: nil)

    Human-readable error message

  • (defaults to: {})

    Arbitrary diagnostic context (frozen on assignment)



13
14
15
16
# File 'lib/jetstream_bridge/errors.rb', line 13

def initialize(message = nil, context: {})
  super(message)
  @context = context.freeze
end

Instance Attribute Details

#contextHash (readonly)

Returns Structured context for diagnostics.

Returns:

  • Structured context for diagnostics



9
10
11
# File 'lib/jetstream_bridge/errors.rb', line 9

def context
  @context
end