How to show exceptions raised in Datasnap REST Server, in the client?

-1
Very good afternoon, everyone. So I have the following problem. I created a multilayer Application using Datasnap REST Server. I implemented the server with all the servermethods and also the client, so far so good ... I'm using Firedac Reflection to bring the data and FDMemTable to List them. Only when there is a bank error, only the Server shows the message of error and in the client does not show, making maintenance difficult and very bad to identify errors, because if I have 2 machines, one with the server and another with the client, only the error is shown in the Server, I have to go the to know what's happening. Has anyone ever been able to show the error on the client? Without using OnReconcileError, because crud is done by methods passing the object by parameter.

    
asked by anonymous 18.09.2016 / 01:55

1 answer

0

I could do as follows, pass as parameter in the server function the type out , because it returns you the value after the client makes the request. For example:

Servidor:
function grava(out psVariavel: String): Boolean;

In the client when you call this function you pass as a parameter, a variable or an FDMemTable, so it will return you what happens on the server.

I hope you have been clear. Hugs!

    
19.10.2016 / 15:38