public function setCloseOnError($close)
    {
        if (!is_bool($close)) {
            throw new \Plop\Exception('Invalid value');
        }
        $this->closeOnError = $close;
        return $this;
    }