throw exception on insert failure