uses IdStacktry idHTTP.get(URL); except on E: Exception do begin if E is EIdSocketError then case EIdSocketError(E).LastError of HOST_NOT_FOUND, WSANO_DATA: begin self.Terminate; DoError(Format('%d, ThID: %d,找不到网络,请检查网络连接. Except: %s', [EIdSocketError(E).LastError, ThreadIndex, S_Intervenor[FIntervenor], E.Message])); Exit; end; end;
idHTTP.get(URL);
except on E: Exception do begin
if E is EIdSocketError then
case EIdSocketError(E).LastError of
HOST_NOT_FOUND, WSANO_DATA: begin
self.Terminate;
DoError(Format('%d, ThID: %d,找不到网络,请检查网络连接. Except: %s', [EIdSocketError(E).LastError, ThreadIndex, S_Intervenor[FIntervenor], E.Message]));
Exit; end;
end;