ERROR on E: EIdSocketError do begin - Delphi
delphi
Solution
`EIdSocketError` is defined in the `IdStack` unit. You need to add that unit to your `uses` clause.
Problem
I'm starting in Delphi , and creating a program to download ... In which I realize that when I try to download and type a wrong URL and it can not download ... Generates the error Error # 10060 Socket connection Time out ... I know that this error is generated when it gets too long trying to make a connection to a URL that does not exist .... ``` E: EIdHTTPProtocolException ``` he Raises the number 0 (zero ) Error ... it does not exist in HTTP ... I'm trying to prevent this error appears , it stops trying to access the page ... but I want the response to this error ... and cause it not to appear .... I believe it is using: `on E: EIdSocketError the begin` ... But the program generates error when I try to use : `undeclared undefined EIdSocketError` How am by starting in delphi ... I do not know where I'm going wrong ... how to correct this error : undeclared undefined EIdSocketError [ dcc32 Error] Unit1.pas ( 162 ) : E2003 Undeclared identifier: ' EIdSocketError ' ``` except on E: EIdSocketError do begin end ; on E: EIdHTTPProtocolException the Begin / / Handle the error generated code_erro : = IdHTTP.ResponseCode ; / / code_erro : = E.ErrorCode ; end end ; ```