Sha256: bf00fe402379de57e028176dee950c2b61e5d4948ff6d1fafc52a14bc1ef87b4

Contents?: true

Size: 241 Bytes

Versions: 28

Compression:

Stored size: 241 Bytes

Contents

# encoding: utf-8

module Adhearsion::Safely
  def catching_standard_errors(l = logger, &block)
    yield
  rescue StandardError => e
    Adhearsion::Events.trigger :exception, [e, l]
  end
end

class Object
  include Adhearsion::Safely
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
adhearsion-2.3.1 lib/adhearsion/foundation/exception_handler.rb
adhearsion-2.3.0 lib/adhearsion/foundation/exception_handler.rb
adhearsion-2.2.1 lib/adhearsion/foundation/exception_handler.rb
adhearsion-2.2.0 lib/adhearsion/foundation/exception_handler.rb
adhearsion-2.1.3 lib/adhearsion/foundation/exception_handler.rb
adhearsion-2.1.2 lib/adhearsion/foundation/exception_handler.rb
adhearsion-2.1.1 lib/adhearsion/foundation/exception_handler.rb
adhearsion-2.1.0 lib/adhearsion/foundation/exception_handler.rb