Link to home
Start Free TrialLog in
Avatar of abpdk
abpdkFlag for Denmark

asked on

Indy - catch EIdCouldNotBindSocket

Hi

I'm having this (probably trivial) problem with the above mentioned exception. I know it comes from me starting up multiple instances of the same application (containing a TIdUDPServer).

What I can't figure out is how do I catch it!?
It would be nice if the program could gracefully recover instead of crashing, right! :)

// abpdk
Avatar of abpdk
abpdk
Flag of Denmark image

ASKER

Why do I suddently feel like an idiot...well were it not for the fact that I din't try this earlier, I think.
Having the Active property set to false and setting it at runtime, it works just catching Exception.
Like so:

  try
    IdUDPServer.Active := true;
  except
    on Exception do ShowMessage('Damn!');
  end;
ASKER CERTIFIED SOLUTION
Avatar of GranMod
GranMod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial