Sha256: 9e5f26a5a1831ac5af8c7397e66fe1da13dd6f9fddca01b2c0656f6f66a80a5f
Contents?: true
Size: 342 Bytes
Versions: 7
Compression:
Stored size: 342 Bytes
Contents
require 'interception' def log_exceptions(&block) Interception.listen(block) do |exception, binding| puts "raised: #{exception.inspect} from #{binding.eval("__method__")}" end end def hello raise "oopsy" rescue => exception puts "rescued: #{exception.inspect} in #{__method__}" raise "daisy" end log_exceptions do hello end
Version data entries
7 entries across 7 versions & 2 rubygems