<% if @cleaned_data[:first_seen_at] %>
This exception occurred <%= @cleaned_data[:occurrences] %> times since <%= @cleaned_data[:first_seen_at] %>.
<% end %>
Error # <%= @cleaned_data[:timestamp] -%>
URL:
<% if (request = @cleaned_data[:request]) %>
<%= request[:url] || 'no URL in request data'.html_safe %>
Referred from: <%= (@cleaned_data[:environment]['HTTP_REFERER'] || 'no referrer').html_safe %>
<% else %>
no URL accessed
<% end %>
User summary:
<% if (user_details = @cleaned_data[:user_details]) && ( user_details[:user] || user_details[:organization] ) %>
User: <%= h user_details[:user] %> (<%= h user_details[:username] %>)
Organization: <%= user_details[:organization] %>
<%= "Network: #{h user_details[:organization].network if user_details[:organization]}" if !user_details[:organization].is_a?(Network) %>
<% if @cleaned_data[:user_details][:impersonated_organization] %>
Impersonating:
Organization: <%= h @cleaned_data[:user_details][:impersonated_organization] %>
<% end %>
<% else %>
No user logged in.
<% end %>
Exception:
<%= h(@cleaned_data[:error]).gsub("\n","
\n").gsub(/ {2,}/) { |spaces| ' '*spaces.size }.html_safe %>
Where:
<%= "#{ h location[:controller]}##{ h location[:action]}
".html_safe if (location = @cleaned_data[:location]) && location[:controller] -%>
<%= "#{ h location[:file]}, line #{ h location[:line]}
".html_safe if (location = @cleaned_data[:location]) && location[:file] -%>
<% for section in ExceptionHandling::ExceptionInfo::SECTIONS %>
<% section_value = @cleaned_data[section] %>
<% if section_value %>
<%= section.to_s.capitalize -%>:
<%= case section_value
when Hash
section_value[:to_s]
when Array
section_value.join( "\n" )
when NilClass # omitted
else
raise "Unexpected value #{section_value.inspect} for section #{section}"
end
-%>
<% end %>
<% end %>