class Epuber::Server::ShowExceptions
Public Instance Methods
Source
# File lib/epuber/server.rb, line 34 def call(env) e = env['sinatra.error'] if prefers_plain_text?(env) content_type = 'text/plain' body = [dump_exception(e)] else content_type = 'text/html' body = pretty(env, e) end body = [body] unless body.is_a?(Array) [500, { 'Content-Type' => content_type, 'Content-Length' => Rack::Utils.bytesize(body.join).to_s }, body] end