try { ini->UpdateFile(); } catch (Exception &E) { MessageDlg(E.Message, mtError, TMsgDlgButtons() << mbOK, 0); } delete ini;