есть кусок кода:
Код:
procedure TConnectToServerForm.FormShow(Sender: TObject);
var
Registry: TRegistry;
begin
Registry := TRegistry.Create;
// Set position in list server
Registry.RootKey := HKEY_CURRENT_USER;
Registry.OpenKey('Software\Configurator', true);
try
SQLServerCombobox.ItemIndex := Registry.ReadInteger('LastIndexServerList');
except
SQLServerCombobox.ItemIndex := 0;
end;
Registry.CloseKey;
// Set login in list server
Registry.RootKey := HKEY_CURRENT_USER;
Registry.OpenKey('Software\Configurator', true);
try
SQLLoginEdit.Text := Registry.ReadString('LastLoginServerList');
except
SQLLoginEdit.Text := '';
end;
Registry.CloseKey;
Registry.Free;
end;
Exeption c текстом:
First chance exception at $75F59617. Exception class ERegistryException with message 'Failed to get data for 'LastIndexServerList''. Process configurator.exe (3932)
Выскакивает только один раз при чтении именно этого Int значения.
При чтении строкового параметра exception не выскакивает.
Почему при чтении строкового параметра exception не выскакиевает? Ни одного из параметров в реестре нет. Ни строкового ни интового.
---
win7, d2010