You are not logged in.
Pages: 1
by the way, above problem only accured on lazarus , when the same code compiled by delphi XE, it works fine and the client side could get exception message that sever side raised.
below is example code on server side:
Tpublic = class(TInjectableObjectRest, Ipublic)
public
procedure ErrorTest(S1,S2:RawUTF8);
end
procedure Tpublic.ErrorTest(S1,S2:RawUTF8);
begin
//do nothing,just raise a exception
raise Exception.Create('ErrorTest');
end;
client side code:
procedure TfrmClient.test;
var i:integer;
FModel: TOrmModel;
HttpClient: TRestHttpClient;
publicService: Ipublic;
begin
FModel := TOrmModel.Create([],'public');
HttpClient := TRestHttpClient.Create('localhost', '8088', FModel);
HttpClient.Model.Owner:=HttpClient;
HttpClient.ServiceDefine([Ipublic], sicShared);
if httpClient.Resolve(Ipublic, publicService) then
begin
publicService.ErrorTest('d','d');
end;
end;
when I call test procedure on client side, the server side application crash immediately. is that because I missed something code on server side?
can anyone help me?
thanks a lot!
Pages: 1