Exception: Hanami::View::TemplateNotFoundError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/hanami/view/errors.rb

Overview

Error raised when template could not be found within a view's configured paths.

Since:

  • 2.1.0

Instance Method Summary collapse

Constructor Details

#initialize(template_name, format, lookup_paths) ⇒ TemplateNotFoundError

Returns a new instance of TemplateNotFoundError.

Since:

  • 2.1.0



27
28
29
30
31
32
33
34
# File 'lib/hanami/view/errors.rb', line 27

def initialize(template_name, format, lookup_paths)
  msg = [
    "Template `#{template_name}' for format `#{format}' could not be found in paths:",
    lookup_paths.map { |path| " - #{path}" }
  ].join("\n\n")

  super(msg)
end