delphi中try的用法1
try...except..end;查询异常
try
edHH.Visible := False;
ListBox.Visible := not edHH.Visible;
listBox.Clear;
I := 0;
while not Eof do
begin
SendToExeLog('H11');
listBox.Items.Add(IntToStr(ZSBID) + ' ' + ZNAME);
setlength(myPP, i + 1);
myPP[I].myInx := (ZBASEID);
inc(I);
end;
RgBox.Caption := '请选择品牌';
ListBox.SetFocus();
except
on E: Exception do
begin
DataMain.sLastError := e.Message;
SendToExeLog(e.Message); //返回错误原因到日志中
end;
end;
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。