public function process(Collection $items, Closure $cb, Closure $error = null): void
    {
        $items->each(function ($item) use ($cb, $error): void {
            try {
                $cb($item);
            } catch (Exception $e) {
                if (! $error) {
                    throw $e;
                }

                $error($e);
            }
        });
    }