fix not throwing exception
Merge pull request #2 from balamaci/fix_not_throw

fix not throwing exception