improved throw catch error handling when deleting rows