[SharpGen] Fix issue #234. Error message was not clear