refactor exception throw
refactor exceptions