<%= @attr[:exception].message %> <%= @attr[:backtrace].first %><% sections = @attr[:sections].map do |section| begin summary = render(section).strip if summary.present? title = render("title", :title => section).strip "#{title}#{summary}" end rescue Exception => e title = render("title", :title => section).strip summary = [[e.class.to_s, e.message].join(": "), e.backtrace && e.backtrace.join("\n")].compact.join("\n\n") [title, "
None
"].join("") end end.join sections = sections.force_encoding('UTF-8').encode('UTF-16LE', :invalid => :replace).encode('UTF-8') if sections.respond_to?(:force_encoding) -%> <%= raw sections %>