Exception: GraphQL::StringEncodingError

Inherits:
RuntimeTypeError show all
Defined in:
lib/graphql/string_encoding_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(str) ⇒ StringEncodingError

Returns a new instance of StringEncodingError



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

def initialize(str)
  @string = str
  super("String \"#{str}\" was encoded as #{str.encoding}! GraphQL requires an encoding compatible with UTF-8.")
end

Instance Attribute Details

#stringObject (readonly)

Returns the value of attribute string



4
5
6
# File 'lib/graphql/string_encoding_error.rb', line 4

def string
  @string
end