replaced simple string errors with full Errors, in order to make debugging easier.
Merge pull request #1644 from plancien/master

replaced simple string errors with full Errors