Jump to content

Michal S.

  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. Michal S.

    Get Exception message on client

    Hello @Andrea Magni, still the same 😞 - I'm using TMARSClient and when I declare MarsApplication.OnError handler, I receive again only general exception with 500 Internal Server Error message. On the client the EIdHttpProtocolException is raised, but from your example we need the EMARSClientHttpException, where error message is in the Exception.Content. Maybe update the Hello world demo will be the best way (I'm trying on the Hello world demo too). Thanks for your help Sincerely, Michal
  2. Michal S.

    Get Exception message on client

    Hello @Andrea Magni, thank you for your reply, but it doesn't work for me 😞 Even if I try the Hello world demo and modify the HelloWorld server function this way: function THelloWorldResource.HelloWorld(): string; begin Result := 'Hello, World!'; raise EMARSHttpException.Create('This is my ugly error message...'); end; On the client side I still have only Internal server error message. Don't you have some demo for this? Thank you very much Sincerely, Michal
  3. Hello, I start with MARS and I need to show on client exception message from server. What I mean: Server side: function THelloWorldResource.SayHelloWorld: string; begin Result := 'Hello World message!'; raise EMARSApplicationException.Create('This is server exception message.', 500); end; On client I tried this: DataModuleRest.HelloWorldResource.GET(nil, nil, procedure (AException: Exception) begin raise Exception.Create('Exception message: '+AException.Message); end); But only error message what I get on client is "HTTP/1.1 500 Internal Server Error" Please can you help me, how to get the server exception message on the client?