private function runCode()
    {
        if ($this->executed) {
            return $this->result;
        }

        $code = $this->code;
        try {
            $this->result = $code();
        } catch (\Throwable $ex) {
            $this->exception = $ex;
        } finally {
            $this->executed = true;
        }

        return $this->result;
    }