Make error handling a bit more consistent :office:

Fixes #16, more or less.
Merge pull request #18 from tivac/error-handling

Make error handling a bit more consistent :office: