Sha256: c4fce788f42fdd85a50c2f4c0cc7619eeea576116784021503b0d91a18985d4d
Contents?: true
Size: 355 Bytes
Versions: 2
Compression:
Stored size: 355 Bytes
Contents
# frozen_string_literal: true # rubocop:disable Metrics/AbcSize module LightServiceExt module WithErrorHandler def with_error_handler(ctx:) @result = yield || ctx rescue StandardError => e ctx.record_raised_error(e) ctx.add_status(Status::COMPLETE) ctx.fail! ctx end end end # rubocop:enable Metrics/AbcSize
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
light-service-ext-0.1.11 | lib/light-service-ext/with_error_handler.rb |
light-service-ext-0.1.10 | lib/light-service-ext/with_error_handler.rb |