Add exception handling to delete.