• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1070
  • Last Modified:

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
0
abpdk
Asked:
abpdk
1 Solution
 
abpdkAuthor Commented:
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;
0
 
GranModCommented:
Closed, 125 points refunded.
GranMod
The Experts Exchange
Community Support Moderator of all Ages
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now