Sha256: d5a62ec56389bac7504093f01e0d52f107a9d06af2e5b7ba89ee73824dea51f9
Contents?: true
Size: 422 Bytes
Versions: 1
Compression:
Stored size: 422 Bytes
Contents
module CrashHook class Middleware attr_reader :config def initialize(app, options={}) @app = app @config = CrashHook.configure(options) end def call(env) @app.call(env) rescue Exception => exception unless @config.ignore_exception?(exception.class.to_s) CrashHook::Crash.new(@config, exception, env).notify end raise exception end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
crash_hook-0.2.0 | lib/crash_hook/middleware.rb |