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.6.4 lib/adhearsion/foundation/exception_handler.rb
adhearsion-2.6.3 lib/adhearsion/foundation/exception_handler.rb
adhearsion-3.0.0.rc1 lib/adhearsion/foundation/exception_handler.rb
adhearsion-3.0.0.beta2 lib/adhearsion/foundation/exception_handler.rb
adhearsion-3.0.0.beta1 lib/adhearsion/foundation/exception_handler.rb
adhearsion-2.6.2 lib/adhearsion/foundation/exception_handler.rb
adhearsion-2.6.1 lib/adhearsion/foundation/exception_handler.rb
adhearsion-2.6.0 lib/adhearsion/foundation/exception_handler.rb
adhearsion-2.5.4 lib/adhearsion/foundation/exception_handler.rb
adhearsion-2.5.3 lib/adhearsion/foundation/exception_handler.rb
adhearsion-2.5.2 lib/adhearsion/foundation/exception_handler.rb
adhearsion-2.5.0 lib/adhearsion/foundation/exception_handler.rb
adhearsion-2.4.0 lib/adhearsion/foundation/exception_handler.rb
adhearsion-2.4.0.beta3 lib/adhearsion/foundation/exception_handler.rb
adhearsion-2.4.0.beta2 lib/adhearsion/foundation/exception_handler.rb
adhearsion-2.4.0.beta1 lib/adhearsion/foundation/exception_handler.rb
adhearsion-2.3.5 lib/adhearsion/foundation/exception_handler.rb
adhearsion-2.3.4 lib/adhearsion/foundation/exception_handler.rb
adhearsion-2.3.3 lib/adhearsion/foundation/exception_handler.rb
adhearsion-2.3.2 lib/adhearsion/foundation/exception_handler.rb