throw exception in one go