<% begin %> <% output = StringIO.new %> <% begin %> <% output.send :eval, script %> <% output.string.each_line do |line| %>

<%= h line %>

<% end %> <% rescue => error %>

<%= h error.class %>: <%= h error.message %>

<% error.backtrace.each do |backtrace| %>

<%= h backtrace %>

<% end %> <% end %> <% rescue => error %> <%= erb :error, locals: { error: error }, layout: false %> <% end %>