Minor cleanup with raising exception
Merge pull request #12 from qba73/fix-exception

Minor cleanup with raising exception