TsgcWSPServer_WAMP › Events › OnError
Fires when the server detects a transport or protocol-level error on a WAMP client connection.
property OnError: TsgcWSErrorEvent;
// TsgcWSErrorEvent = procedure(Connection: TsgcWSConnection; const Error: string) of object
—
Surfaces transport-level failures (TLS negotiation, socket resets, abnormal close) and protocol-level anomalies raised by the WAMP decoder against an incoming frame (unknown message id, malformed JSON). The Error string is a human-readable description intended for logging. Errors produced by application code inside an RPC are reported instead through CallError sent back to the caller, not here. Use OnException for Delphi exceptions raised inside user event handlers.
procedure TForm1.WAMPServerError(Connection: TsgcWSConnection;
const Error: string);
begin
Memo1.Lines.Add(Format('[%s] error: %s', [Connection.Guid, Error]));
end;