add the optional error param to the phpdoc