Class: ActionView::TemplateError

Inherits:
ActionViewError
  • Object
show all
Defined in:
lib/kwartz/helper/rails.rb

Overview

The TemplateError exception is raised when the compilation of the template fails. This exception then gathers a bunch of intimate details and uses it to report a very precise exception message.

Instance Method Summary collapse

Constructor Details

#initialize(base_path, file_name, assigns, source, original_exception) ⇒ TemplateError

Returns a new instance of TemplateError.



453
454
455
456
457
458
459
460
461
462
# File 'lib/kwartz/helper/rails.rb', line 453

def initialize(base_path, file_name, assigns, source, original_exception)
  suffix = Kwartz::Helper::RailsTemplate.pdata_suffix
  len = suffix.length
  if file_name[-len..-1] == suffix
    file_name = file_name[0, file_name.length - len] + '.cache'
  else
    $stderr.puts "*** debug: kwartz/helper/rails.rb: cannot detect cache file name (template=#{file_name.inspect})"
  end
  _initialize_orig(base_path, file_name, assigns, source, original_exception)
end

Instance Method Details

#_initialize_origObject

:nodoc:



451
# File 'lib/kwartz/helper/rails.rb', line 451

alias _initialize_orig initialize