6 7 8 9 10 11 12 13
# File 'lib/light-service-ext/with_error_handler.rb', line 6 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