set error in all pairs