require 'rack/showexceptions' module Sinatra class ShowExceptions < Rack::ShowExceptions def initialize(app) @app = app @template = ERB.new(TEMPLATE) end def frame_class(frame) if frame.filename =~ /lib\/sinatra.*\.rb/ "framework" elsif (defined?(Gem) && frame.filename.include?(Gem.dir)) || frame.filename =~ /\/bin\/(\w+)$/ "system" else "app" end end TEMPLATE = < <%=h exception.class %> at <%=h path %>

BACKTRACE

(expand)

GET

<% unless req.GET.empty? %> <% req.GET.sort_by { |k, v| k.to_s }.each { |key, val| %> <% } %>
Variable Value
<%=h key %>
<%=h val.inspect %>
<% else %>

No GET data.

<% end %>

POST

<% unless req.POST.empty? %> <% req.POST.sort_by { |k, v| k.to_s }.each { |key, val| %> <% } %>
Variable Value
<%=h key %>
<%=h val.inspect %>
<% else %>

No POST data.

<% end %>
<% unless req.cookies.empty? %> <% req.cookies.each { |key, val| %> <% } %>
Variable Value
<%=h key %>
<%=h val.inspect %>
<% else %>

No cookie data.

<% end %>

Rack ENV

<% env.sort_by { |k, v| k.to_s }.each { |key, val| %> <% } %>
Variable Value
<%=h key %>
<%=h val %>

You're seeing this error because you have enabled the show_exceptions setting.

HTML end end