Exception: GQL::Errors::UnknownFieldType

Inherits:
GQL::Error
  • Object
show all
Defined in:
lib/gql/errors.rb

Instance Attribute Summary

Attributes inherited from GQL::Error

#code, #handle

Instance Method Summary collapse

Methods inherited from GQL::Error

#as_json

Constructor Details

#initialize(type, using_class) ⇒ UnknownFieldType

Returns a new instance of UnknownFieldType.



82
83
84
85
86
87
88
89
# File 'lib/gql/errors.rb', line 82

def initialize(type, using_class)
  msg =  "The field type `#{type}' used in #{using_class} is not known."
  msg << "Register your field type with: `GQL.field_types[:#{type}] = My#{type.to_s.camelize}'. "
  msg << "The following field types are currently registered: "
  msg << GQL.field_types.keys.sort.map { |key| "`#{key}'" }.to_sentence

  super(msg, 124)
end