
我是从Delphi开始,并创建一个程序下载...其中我意识到,当我尝试下载并键入错误的URL,它无法下载...生成错误错误#10060套接字连接超时. ..我知道这个错误是在尝试连接到不存在的URL时太长时生成的....
E: EIdHTTPProtocolException
Run Code Online (Sandbox Code Playgroud)
他引发数字0(零)错误......它在HTTP中不存在...
我试图阻止出现此错误,它停止尝试访问该页面...但我希望响应此错误...并导致它不出现....
我相信它正在使用:on E: EIdSocketError the begin......
但是当我尝试使用时,程序会生成错误: undeclared undefined EIdSocketError
怎么从delphi开始...我不知道我哪里出错...如何纠正这个错误:
未声明的未定义的EIdSocketError
[dcc32错误] Unit1.pas(162):E2003未声明的标识符:'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 ;
Run Code Online (Sandbox Code Playgroud)