FTPS: Handle errors
All errors are reported by TElSimpleFTPSClient class using exceptions. The most common errors are socket errors (failed or lost connection) and FTP errors.
The socket errors are usually fatal, meaning that the connection should be closed.
FTP errors are usually non-fatal. When the client sends the FTP command, it expects one of the allowed answers from the server. If the server responds with unexpected response code (for whatever reason), the exception of type EElFTPSError is thrown. This exception includes the response code and the server's human-readable comment. The application can check the error and act accordingly.
As all methods of TElSimpleFTPSClient class are synchronous, they throw an exception if something goes wrong. The application needs to wrap the method calls with corresponding language statements for exception handling.