2
I have an application running in 3 layers.
When the client layer does not find the server or for any other reason, correctly, I burst an error on screen, I am using Tsocketconnections and Tclientdatasets.
I just needed to deal with or even mask these errors reported from Tsocketconnection, that is, what I need is that even if an error occurs that the message is not shown on screen, currently the client-side application is already prepared to proceed after the error, but as the error is presented and this asks for iteration (click OK), the client part cannot proceed.
Thank you all.
You can ask the question the problem code?
– Leonel Sanches da Silva
Gypsy, thank you for your interest. But in fact there is no code with problem ... what I need is to use something that does not bring the error on screen, I tried TRY-EXCEPT but it does not work, I tried to treat also through the Exception within TRY-EXCEPT, but also did not work, what seems to me is that by the client application, whenever there is a connection error in the server application involving the Tsockettconnection the error will be shown on screen.
– Caio Cesar Ferreira
When the client makes the request on the server, it is always good to test the connection before, but if there is a connection and there is a problem on the server, has to treat a message and this message goes back to the client with the error treated, you must declare in the function parameter that is requested out sMensage: String, so when the client requests the server it expects the return.
– Jefferson Rudolf
Jefferson, thank you very much. When I start the process, which is long, I check the connection, and abortion if there is no connection ... my problem is when this connection falls during the process, because, the Tsocketconnection presents the error and is waiting for the OK, already treated the client part to proceed, but I am running into having to give this ok, I needed that even if giving error, nothing was presented on screen and this way the client part could follow normally (as the treatments are already made), everything I did so far could not prevent to present its error.
– Caio Cesar Ferreira