Fix incorrect documentation of error function