public function emittedError($value = null)
    {
        if ($value === null) {
            return $this->emittedErrorEvent;
        } elseif ($value === true) {
            $this->emittedErrorEvent = true;
        } else {
            throw new \InvalidArgumentException('You cannot set the emitted '
                . 'error value to false.');
        }
    }