Throw an error instead of a string
Merge pull request #319 from pdehaan/throw-errors-not-strings

Throw an error instead of a string