TsgcWSPClient_WAMP › Events › OnException
Fires when a Delphi exception is raised inside one of the component's worker threads or event handlers.
property OnException: TsgcExceptionEvent;
// TsgcExceptionEvent = procedure(Connection: TsgcWSConnection; E: Exception) of object
—
Provides a central hook for exceptions that would otherwise terminate a background thread silently (JSON parse failures in user code, bugs inside OnEvent/OnCallResult handlers, OS-level errors in TLS). The exception is caught by the component and surfaced here so the application can log it or notify the user. Differs from OnError, which reports protocol-level conditions as plain strings rather than typed exceptions.
procedure TForm1.WAMPException(Connection: TsgcWSConnection; E: Exception);
begin
Memo1.Lines.Add(Format('exception: %s - %s', [E.ClassName, E.Message]));
end;