TsgcWSPClient_WAMPEvents › OnError

OnError Event

Fires when the component detects a transport or protocol-level error condition.

Syntax

property OnError: TsgcWSErrorEvent;
// TsgcWSErrorEvent = procedure(Connection: TsgcWSConnection; const Error: string) of object

Default Value

Remarks

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.

Example


procedure TForm1.WAMPError(Connection: TsgcWSConnection; const Error: string);
begin
  Memo1.Lines.Add('wamp error: ' + Error);
end;

Back to Events