Module: Adhearsion::Safely

Included in:
Object
Defined in:
lib/adhearsion/foundation/exception_handler.rb

Instance Method Summary collapse

Instance Method Details

#catching_standard_errors(l = logger, &block) ⇒ Object


4
5
6
7
8
# File 'lib/adhearsion/foundation/exception_handler.rb', line 4

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