protected function normalizeException($exception, array $nodes, array $path = []): ExecutionException
    {
        if ($exception instanceof \Throwable) {
            return new ExecutionException(
                $exception->getMessage(),
                $nodes,
                null,
                null,
                $path,
                null,
                $exception
            );
        }

        if (\is_string($exception)) {
            return new ExecutionException(
                $exception,
                $nodes,
                null,
                null,
                $path
            );
        }

        return new ExecutionException(
            '',
            $nodes,
            null,
            null,
            $path
        );
    }