protected function getTransformed(Throwable $exception): Throwable
    {
        if (! $exception instanceof OutOfMemoryException || \count($this->transformers) === 0) {
            return $exception;
        }

        foreach ($this->transformers as $transformer) {
            /** @var TransformerContract $transformer */
            $exception = $transformer->transform($exception);
        }

        return $exception;
    }