class Aws::Xray::DefaultErrorHandler

Public Class Methods

new(io) click to toggle source

@param [IO] io

# File lib/aws/xray/error_handlers.rb, line 5
def initialize(io)
  @io = io
end

Public Instance Methods

call(error, payload, host:, port:) click to toggle source

@param [Exception] error @param [String] payload @param [String,nil] host @param [Integer,nil] port

# File lib/aws/xray/error_handlers.rb, line 13
      def call(error, payload, host:, port:)
        @io.puts(<<-EOS)
Failed to send a segment to #{host}:#{port}:
Segment:
#{payload}
Error: #{error}
#{error.backtrace.join("\n")}
        EOS
      end