class ActionView::StreamingTemplateRenderer::Body
:nodoc:
rendering the template.
It is initialized with a block that, when called, starts
A valid Rack::Body (i.e. it responds to each).
:nodoc:
* Rack::Cache needs to support streaming bodies
* Support streaming from child templates, partials and so on.
== TODO
def each(&block)
def each(&block) begin @start.call(block) rescue Exception => exception log_error(exception) block.call ActionView::Base.streaming_completion_on_exception end self end
def initialize(&start)
rendering the template.
It is initialized with a block that, when called, starts
A valid Rack::Body (i.e. it responds to each).
:nodoc:
* Rack::Cache needs to support streaming bodies
* Support streaming from child templates, partials and so on.
== TODO
def initialize(&start) @start = start end
def log_error(exception)
def log_error(exception) logger = ActionView::Base.logger return unless logger message = +"\n#{exception.class} (#{exception.message}):\n" message << exception.annotated_source_code.to_s if exception.respond_to?(:annotated_source_code) message << " " << exception.backtrace.join("\n ") logger.fatal("#{message}\n\n") end