Exception: Lotus::View::MissingTemplateError
- Inherits:
-
StandardError
- Object
- StandardError
- Lotus::View::MissingTemplateError
- Defined in:
- lib/lotus/view.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.
Instance Method Summary collapse
-
#initialize(template, format) ⇒ MissingTemplateError
constructor
A new instance of MissingTemplateError.
Constructor Details
#initialize(template, format) ⇒ MissingTemplateError
Returns a new instance of MissingTemplateError.
30 31 32 |
# File 'lib/lotus/view.rb', line 30 def initialize(template, format) super("Can't find template '#{ template }' for '#{ format }' format.") end |