Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TIdTCPClient on Android: Can't catch Exception Popup - Socket Error #107
#2
(06-18-2020, 09:25 AM)Peter_WB Wrote: On Android, the Indy 10 pop up with a Message Box 'Socket Error 107' when we try to connect to an URL which is not available yet.

Indy does not display message boxes, it just raises exceptions. Either YOU, the RTL, or the OS itself, is the one displaying message boxes, usually on uncaught exceptions only.

(06-18-2020, 09:25 AM)Peter_WB Wrote: We are not able to catch the exception in our code, so our app is not able to handle this.

I see nothing in the code you have shown that would prevent exceptions from being caught.

On the other hand, Embarcadero's exception handling on Android is severely broken in C++Builder, so it is not outside the realm of possibility that there is also something broken in Delphi, too. Assuming you are using Delphi, and not FreePascal. What version of Delphi/FPC are you actually using?

Either way, whatever is going on has to be happening outside of Indy. You are just going to have to debug the code to see how the exception is actually handled and how it leads to a message box.

Also, note that EIdSocketError is not the only kind of exception that TIdTCPClient.Connect() can raise. It may raise EIdConnectException, which is not derived from EIdSocketError. But your generic Exception handler should catch that.

Reply


Messages In This Thread
RE: TIdTCPClient on Android: Can't catch Exception Popup - Socket Error #107 - by rlebeau - 06-19-2020, 12:40 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)