Exception: Graphiti::Errors::RecordNotFound
- Defined in:
- lib/graphiti/errors.rb
Instance Method Summary collapse
-
#initialize(resource = nil, id = nil, path = nil) ⇒ RecordNotFound
constructor
A new instance of RecordNotFound.
- #message ⇒ Object
Constructor Details
#initialize(resource = nil, id = nil, path = nil) ⇒ RecordNotFound
Returns a new instance of RecordNotFound.
744 745 746 747 748 |
# File 'lib/graphiti/errors.rb', line 744 def initialize(resource = nil, id = nil, path = nil) @resource = resource @id = id @path = path end |
Instance Method Details
#message ⇒ Object
750 751 752 753 754 755 756 757 758 |
# File 'lib/graphiti/errors.rb', line 750 def if !@resource.nil? && !@id.nil? "The referenced resource '#{@resource}' with id '#{@id}' could not be found.".tap do |msg| msg << " Referenced at '#{@path}'" unless @path.nil? end else "Specified Record Not Found" end end |