Sha256: cc09c7e9e283bc264a01dbed59dd15af6ffc2bb182ef3b468e00f9cfc0e92eb5
Contents?: true
Size: 323 Bytes
Versions: 62
Compression:
Stored size: 323 Bytes
Contents
# frozen_string_literal: true module DelayedExceptions def with_delayed_exceptions(enumerable, *catch, &block) exceptions = [] enumerable.each do |i| begin block.call(i) rescue *catch => e exceptions << e end end.tap { raise exceptions.first if exceptions.first } end end
Version data entries
62 entries across 62 versions & 3 rubygems