Sha256: 1723b0a0a67eef1fbc2ee5c5c3f4fe0a90e27de7d2728abebd8fed460b033449
Contents?: true
Size: 380 Bytes
Versions: 30
Compression:
Stored size: 380 Bytes
Contents
class ShowTestExceptions attr_reader :app def initialize(app) @app = app end def call(env) app.call(env) rescue StandardError, LoadError, SyntaxError => e body = [ e.message, e.backtrace.join("\n\t") ].join("\n") [ 500, {"Content-Type" => "text", "Content-Length" => body.size.to_s}, body ] end end
Version data entries
30 entries across 30 versions & 8 rubygems