invite func throw exception