Exception: GQL::Errors::FieldClassNotSet

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(node_class, name) ⇒ FieldClassNotSet

Returns a new instance of FieldClassNotSet.



74
75
76
77
78
79
# File 'lib/gql/errors.rb', line 74

def initialize(node_class, name)
  msg =  "#{node_class} must have a #{name.humanize(capitalize: false)} set. "
  msg << "Set it with `self.#{name} = My#{name.camelize}Class'."

  super(msg, 122)
end