def METHOD_NAME(self, current_text):
    try:
        molarMass = toMolarMass(current_text)
        # if this doesn't fail, update the model item for formula
        # so related values can get recomputed
        self.model.item(MODEL.MOLECULAR_FORMULA).setText(current_text)
    except (ArithmeticError, ValueError):
        self.model.item(MODEL.MOLAR_VOLUME).setText("")