Module: Bramble::ErrorHandling

Defined in:
lib/bramble/error_handling.rb

Class Method Summary collapse

Class Method Details

.rescuing(implementation) ⇒ Object

If an error is raised during the block, pass it to the implementation’s ‘on_error` function.



5
6
7
8
9
# File 'lib/bramble/error_handling.rb', line 5

def self.rescuing(implementation)
  yield
rescue StandardError => err
  implementation.on_error(err)
end