fixed when_throw
different exceptions
Merge branch 'feature/when-throw-refactor'