Updating generic.py error message

This is my first attempt at a PR. I just made a little change to allow an error message. Would appreciate some feedback. 
Based on https://github.com/pydata/pandas/issues/8015
I think that should be removed. Can you remove the two commits I've submitted so far and I'll send in a brand new one with all those changes?