Exception: Lotus::View::MissingTemplateError

Inherits:
Error
  • Object
show all
Defined in:
lib/lotus/view/errors.rb

Overview

Missing template error

This is raised at the runtime when Lotus::View cannot find a template for the requested format.

We can’t raise this error during the loading phase, because at that time we don’t know if a view implements its own rendering policy. A view is allowed to override ‘#render`, and this scenario can make the presence of a template useless. One typical example is the usage of a serializer that returns the output string, without rendering a template.

Since:

  • 0.1.0

Instance Method Summary collapse

Constructor Details

#initialize(template, format) ⇒ MissingTemplateError

Returns a new instance of MissingTemplateError.

Since:

  • 0.1.0



20
21
22
# File 'lib/lotus/view/errors.rb', line 20

def initialize(template, format)
  super("Can't find template '#{ template }' for '#{ format }' format.")
end