TsgcWSPClient_sgc › Olaylar › OnRPCError
Sunucu bir RPC isteğine bir hata yanıtı döndürdüğünde tetiklenir.
property OnRPCError: TsgcWSRPCErrorEvent;
// TsgcWSRPCErrorEvent = procedure(Connection: TsgcWSConnection; Id: string; ErrorCode: integer; ErrorMessage, ErrorData: string) of object
—
Id, RPC'ye geçirilen değerle eşleşir. ErrorCode, sunucu tarafından döndürülen sayısal koddur, ErrorMessage kısa açıklamadır ve ErrorData isteğe bağlı genişletilmiş bilgilerdir (genellikle JSON). Bekleyen giriş, RPC listesinden otomatik olarak kaldırılır.
procedure TForm1.oProtocolRPCError(Connection: TsgcWSConnection; Id: string;
ErrorCode: integer; ErrorMessage, ErrorData: string);
begin
Memo1.Lines.Add(Format('rpc %s error %d: %s', [Id, ErrorCode, ErrorMessage]));
end;