Exception: ActionView::SyntaxErrorInTemplate
Do not use. This class is for internal use only.
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Template::Error ,
ActionViewError ,
StandardError
|
|
Instance Chain:
self,
Template::Error ,
ActionViewError ,
StandardError
|
|
Inherits: |
ActionView::Template::Error
|
Defined in: | actionview/lib/action_view/template/error.rb |
Constant Summary
Template::Error
- Inherited
Class Method Summary
Template::Error
- Inherited
Instance Attribute Summary
Template::Error
- Inherited
Instance Method Summary
Template::Error
- Inherited
Constructor Details
.new(template, offending_code_string) ⇒ SyntaxErrorInTemplate
# File 'actionview/lib/action_view/template/error.rb', line 246
def initialize(template, offending_code_string) @offending_code_string = offending_code_string super(template) end
Instance Method Details
#annotated_source_code
[ GitHub ]# File 'actionview/lib/action_view/template/error.rb', line 257
def annotated_source_code @offending_code_string.split("\n").map.with_index(1) { |line, index| indentation = " " * 4 "#{index}:#{indentation}#{line}" } end
#message
[ GitHub ]# File 'actionview/lib/action_view/template/error.rb', line 251
def <<~MESSAGE Encountered a syntax error while rendering template: check #{@offending_code_string} MESSAGE end