Good day! I am writing a program for transferring files over a network (TCP protocol) using the components of Indy idTCPServer , idTCPClient . On the client side, I write the following code to receive the file from the server:
try put:=directorylistbox1.Directory+'\'; IdTCPClient1.ConnectAndGetAll; except // **Обработка исключений.**.. end; The question is how you can connect the try..except construct try..except that it distinguishes between various errors when retrieving data:
- Server is not responding
- File size is too big
- There is no file on the server
- Is the connection broken before the file is received?
Tell me, what do I need to register in exception handling?