Change all throws to error statements