Updating generic.py error message #8618 - New branch

I deleted the previous branch that was causing problems and submitted this.
This is my first attempt at a PR. I just made a little change to allow an error message. Would appreciate some feedback.
@jreback @jorisvandenbossche @hayd 

@jreback this test was introduced in #5510, but I think it is ok to change it, as it is mainly testing the empty frame, not the empty groupby call.