Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 183
  • Last Modified:

Blocked Port

If my programm is trying to open a TCP port that is allready in use I get an error message. how do I remove that message and maybe replase it with one off my own?
0
SwOoPe
Asked:
SwOoPe
  • 4
  • 2
1 Solution
 
delphiexpertCommented:
Well I assume that an exception is being generated.

solution:

try
tcp.open;
except
ShowMessage('Error, port is in use!');
end;
0
 
SwOoPeAuthor Commented:
It wont aprove the use off  'except'

I get: 'END' expected but 'except' found

Any solution?? I need this to work if I'll add any ports.
0
 
SwOoPeAuthor Commented:
By the way, Im using Delphi 4 Client/Server
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
SwOoPeAuthor Commented:
Sorry my fault. I forgot to the 'try' part, but it still dident work.

I still get the usual error mesage from
ScktComp.pas
0
 
EpsylonCommented:
If you run this code inside Delphi you will still raise the exception, but if you just run the exe, it won't...
0
 
delphiexpertCommented:
. unless you disable "break on exception" under Environment options|debugging. (that's where it is in Delphi 3 anyway)
0
 
SwOoPeAuthor Commented:
Thanks u were right
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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