Sha256: 49a74fa7020716e275dcb6457c67808f1162af243283df71ecfa75a1ad180013

Contents?: true

Size: 480 Bytes

Versions: 8

Compression:

Stored size: 480 Bytes

Contents

# frozen_string_literal: true

module Liam
  class UninitializedMessageProcessorError < StandardError
    def initialize(error)
      @error = error
      super(
        <<~MSG.gsub(/\n/, '')
          Expected file #{class_name} 
          defined in app/services/liam to process the message, 
          but it has not been initialized.
        MSG
      )
    end

    private

    attr_reader :error

    def class_name
      error.to_s[/[\w+::+\w+]+(?=\z)/]
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
aws-liam-0.0.9 lib/liam/exceptions/uninitialized_message_processor_error.rb
aws-liam-0.0.8 lib/liam/exceptions/uninitialized_message_processor_error.rb
aws-liam-0.0.7 lib/liam/exceptions/uninitialized_message_processor_error.rb
aws-liam-0.0.6 lib/liam/exceptions/uninitialized_message_processor_error.rb
aws-liam-0.0.5 lib/liam/exceptions/uninitialized_message_processor_error.rb
aws-liam-0.0.4 lib/liam/exceptions/uninitialized_message_processor_error.rb
aws-liam-0.0.3 lib/liam/exceptions/uninitialized_message_processor_error.rb
aws-liam-0.0.2 lib/liam/exceptions/uninitialized_message_processor_error.rb