Sha256: 3b1acf327f395421164f39cd755bab5fa52e57cc51bd7c44cb9e05035f241457

Contents?: true

Size: 387 Bytes

Versions: 1

Compression:

Stored size: 387 Bytes

Contents

module Koine
  module Attributes
    class ArgumentError < ::ArgumentError
      attr_reader :attribute_name

      def initialize(error, attribute_name = nil)
        @attribute_name = attribute_name

        if error.is_a?(Exception)
          super(error.message)
          set_backtrace(error.backtrace)
          return
        end

        super(error)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
koine-attributes-1.1.0 lib/koine/attributes/argument_error.rb