Class: GraphQL::FloatDecodingError

Inherits:
RuntimeTypeError
  • Object
show all
Defined in:
lib/graphql/float_decoding_error.rb

Overview

This error is raised when Types::Float is given a non-finite input value.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ FloatDecodingError

: (Float value) -> void



12
13
14
15
# File 'lib/graphql/float_decoding_error.rb', line 12

def initialize(value)
  @float_value = value
  super("Float is not finite: #{value.inspect}.")
end

Instance Attribute Details

#float_value ⇒ Object (readonly)

The value which couldn't be decoded : Float



9
10
11
# File 'lib/graphql/float_decoding_error.rb', line 9

def float_value
  @float_value
end