Sha256: 292f193007f253b37d874ff6e475baf2c1a4569e6924ed0665029ac2bddc7cf7

Contents?: true

Size: 198 Bytes

Versions: 4

Compression:

Stored size: 198 Bytes

Contents

# frozen_string_literal: true

##
# @note `ce` is short for `catch_exception`.
#
# @example
#   ce { some_code }
#   e = ce { some_code }
#
def ce
  yield

  nil
rescue => exception
  exception
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
convenient_service-0.19.1 lib/convenient_service/dependencies/extractions/ce.rb
convenient_service-0.19.0 lib/convenient_service/dependencies/extractions/ce.rb
convenient_service-0.18.0 lib/convenient_service/dependencies/extractions/ce.rb
convenient_service-0.17.0 lib/convenient_service/dependencies/extractions/ce.rb