Refactored exceptions throwing