0

When I get a URL with TIdHTTP, it displays an error dialog:

Socket Error # 10054 Connection reset by peer

I don't want to display this error dialog. How can I catch the error with try...catch and don't show it?

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
  • 2
    `try..catch` is for C++, Delphi uses `try..except` instead: https://docwiki.embarcadero.com/RADStudio/en/Exceptions_(Delphi) That being said, what is the actual problem you are having with catching the exception? Indy's exceptions work like any other library's exceptions, there is nothing magic about them. Catching exceptions is a fundamental skill any Delphi dev should know. So please show the actual code you are having trouble with. – Remy Lebeau Jun 30 '22 at 04:35
  • tks. Replace sslvTLSv3 with sslvTLSv1,Replace pv1_0 with pv1_1 is OK . – pangzhenguang Jul 12 '22 at 01:13
  • there is no `sslvTLSv3`, I assume you meant `sslvSSLv3` instead. – Remy Lebeau Jul 12 '22 at 02:39

0 Answers0