Exception: Spud::NotFoundError

Inherits:
RequestError show all
Defined in:
lib/spud_core/errors.rb

Instance Attribute Summary

Attributes inherited from RequestError

#code, #item, #request_url, #template, #title

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ NotFoundError

Returns a new instance of NotFoundError.



23
24
25
26
27
28
29
30
# File 'lib/spud_core/errors.rb', line 23

def initialize(opts={})
  @item = opts[:item] || 'page'
  @template = opts[:template]
  @code = 404
  @title = "Not Found"
  message = opts[:message] || "The #{item.downcase} you were looking for could not be found."
  super(message)
end