Sha256: 14f3146b48d292381b6f311ff564d7c59f5ad890a91defcd3aeb5478d6b9cf05

Contents?: true

Size: 597 Bytes

Versions: 6

Compression:

Stored size: 597 Bytes

Contents

# frozen_string_literal: true
# rubocop:todo all

module BSON
  class Error

    # Raised when trying to create a Decimal128 from an object that is neither a String nor a BigDecimal.
    class InvalidDecimal128Argument < Error

      # The custom error message for this error.
      MESSAGE = 'A Decimal128 can only be created from a String or BigDecimal.'

      # Get the custom error message for the exception.
      #
      # @example Get the message.
      #   error.message
      #
      # @return [ String ] The error message.
      def message
        MESSAGE
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bson-5.0.2 lib/bson/error/invalid_decimal128_argument.rb
bson-5.0.2-java lib/bson/error/invalid_decimal128_argument.rb
bson-5.0.1 lib/bson/error/invalid_decimal128_argument.rb
bson-5.0.1-java lib/bson/error/invalid_decimal128_argument.rb
bson-5.0.0-java lib/bson/error/invalid_decimal128_argument.rb
bson-5.0.0 lib/bson/error/invalid_decimal128_argument.rb