Fix exception throwing with tests for fail cases

Fixes #12
Closes gh-14
No travis notifications