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

Asked

Viewed 627 times

-1

Good afternoon, you guys. So I have the following problem. I created a multi-tier Application using the Datasnap REST Server. I implemented the server with all servermethods and also the client, so far so good... I’m using Firedac’s Reflection to bring the data and Fdmemtable to List them. Only when there is some bank error, only the Server show the message from error and the client does not show, making it difficult to maintain and very bad to identify errors, because if I have 2 machines, one with the server and the other with the client, only shown the error in Server, I have to go there to know what is happening. Has anyone managed to show the error in the client? Without using Onreconcileerror, because crud is done by methods passing the object by parameter.

1 answer

0


Could do as follows, pass as parameter in the server function the type out, because it returns 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 parameter, a variable or an Fdmemtable, so it will return you what happens on the server.

I hope I made myself clear. Hugs!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.