TsgcWSPClient_WAMP › Events › OnError
Fires when the component detects a transport or protocol-level error condition.
property OnError: TsgcWSErrorEvent;
// TsgcWSErrorEvent = procedure(Connection: TsgcWSConnection; const Error: string) of object
—
Surfaces transport-level failures (handshake rejection, TLS errors, socket resets) and protocol-level anomalies (malformed WAMP frames the decoder could not parse). The Error string is a human-readable description suitable for logs. RPC-specific errors raised by the remote peer are NOT reported here — they arrive through OnCallError. Do not confuse with OnException, which handles Delphi exceptions raised inside user code.
procedure TForm1.WAMPError(Connection: TsgcWSConnection; const Error: string);
begin
Memo1.Lines.Add('wamp error: ' + Error);
end;