TsgcWSPClient_Presence › Events › OnException
Fires when an unhandled exception is raised while processing a Presence message.
property OnException: TsgcExceptionEvent;
// TsgcExceptionEvent = procedure(Connection: TsgcWSConnection; E: Exception) of object
—
Fires when an exception propagates out of an internal handler or out of one of your own event handlers that the Presence client calls (OnPublishMsg, OnNewMember, OnSession and friends). Use it to log unexpected errors without crashing the message dispatcher.
procedure TForm1.oPresenceException(Connection: TsgcWSConnection; E: Exception);
begin
Memo1.Lines.Add('Exception: ' + E.Message);
end;