For ENG-6060, fix findbug error of exception not being thrown