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

Returns a new instance of FloatDecodingError.



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

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

Instance Attribute Details

#float_valueObject (readonly)

The value which couldn't be decoded



6
7
8
# File 'lib/graphql/float_decoding_error.rb', line 6

def float_value
  @float_value
end