TsgcWSPClient_sgc › 事件 › OnError
当服务器或传输层报告错误字符串时触发。
property OnError: TsgcWSErrorEvent;
// TsgcWSErrorEvent = procedure(Connection: TsgcWSConnection; const Error: string) of object
—
Error 是错误的人类可读描述,例如无效帧、认证被拒绝或协议违规。语言级异常请使用 OnException。
procedure TForm1.oProtocolError(Connection: TsgcWSConnection; const Error: string);
begin
Memo1.Lines.Add('error: ' + Error);
end;