Sha256: 8be14e89af8454decf33ae1c6944f19b85b84f8eef9db04ca6b872990ebe372b

Contents?: true

Size: 979 Bytes

Versions: 5

Compression:

Stored size: 979 Bytes

Contents

module Embulk
  module Input

    class Elasticsearch < InputPlugin

      module Traceable
        def initialize(e, more_msg = nil)
          message = e.is_a?(String) ? '' : "(#{e.class}) "
          message << "#{e}#{more_msg}\n"
          message << "\tat #{e.backtrace.join("\n\tat ")}\n" if e.respond_to?(:backtrace)

          while e.respond_to?(:cause) and e.cause
            # Java Exception cannot follow the JRuby causes.
            message << "Caused by (#{e.cause.class}) #{e.cause}\n"
            message << "\tat #{e.cause.backtrace.join("\n\tat ")}\n" if e.cause.respond_to?(:backtrace)
            e = e.cause
          end

          super(message)
        end
      end

      class ConfigError < ::Embulk::ConfigError
        include Traceable
      end

      class ConnectionError < ConfigError
      end

      class DataError < ::Embulk::DataError
        include Traceable
      end

      class TypecastError < DataError
      end

    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
embulk-input-elasticsearch-nosslverify-0.3.9 lib/embulk/input/elasticsearch/error.rb
embulk-input-elasticsearch-nosslverify-0.3.8 lib/embulk/input/elasticsearch/error.rb
embulk-input-elasticsearch-nosslverify-0.3.7 lib/embulk/input/elasticsearch/error.rb
embulk-input-elasticsearch-nosslverify-0.3.6 lib/embulk/input/elasticsearch/error.rb
embulk-input-elasticsearch-0.3.6 lib/embulk/input/elasticsearch/error.rb