Sha256: e29652e555a59fd37f0954eb8a9516a2babe46f5f4e44f98fcec80ee1d9202d9

Contents?: true

Size: 553 Bytes

Versions: 5

Compression:

Stored size: 553 Bytes

Contents

module OandaAPI
  module Streaming
    #
    # Raised if an invalid adapter is used with {OandaAPI::Streaming::JsonParser}
    class AdapterError < ArgumentError
      attr_reader :cause

      def self.build(original_exception)
        message = "Did not recognize your adapter specification (#{original_exception.message})."
        new(message).tap do |exception|
          exception.instance_eval do
            @cause = original_exception
            set_backtrace original_exception.backtrace
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
oanda_api-0.9.6 lib/oanda_api/streaming/adapter_error.rb
oanda_api-0.9.5 lib/oanda_api/streaming/adapter_error.rb
oanda_api-0.9.4 lib/oanda_api/streaming/adapter_error.rb
oanda_api-0.9.3 lib/oanda_api/streaming/adapter_error.rb
oanda_api-0.9.2 lib/oanda_api/streaming/adapter_error.rb