lib/kiss/rack/show_exceptions.rb in kiss-0.9.4 vs lib/kiss/rack/show_exceptions.rb in kiss-1.0
- old
+ new
@@ -1,27 +1,14 @@
module Rack
- # Rack::ShowExceptions catches exceptions raised from the app,
- # showing a useful backtrace with clickable stack frames and
- # TextMate links to source files, as well as the last database
- # query, GET/POST params, cookies, and Rack environment variables.
- #
- # Be careful using this on public-facing sites as it could reveal
- # potentially sensitive information to malicious users.
+ # Deprecated; now does nothing.
+ # Functionality moved to Kiss#initialize (lib/kiss.rb).
class ShowExceptions
def initialize(app)
@app = app
end
def call(env)
@app.call(env)
- rescue StandardError, LoadError, SyntaxError => e
- body = Kiss::ExceptionReport.generate(env, e)
- [500, {
- "Content-Type" => "text/html",
- "Content-Length" => body.length.to_s,
- "X-Kiss-Error-Type" => e.class.name,
- "X-Kiss-Error-Message" => e.message.sub(/\n.*/m,'')
- }, body]
end
end
end