cursor: set error message on failure.