TsgcWSPClient_PresenceEvents › OnException

OnException Event

Fires when an unhandled exception is raised while processing a Presence message.

Syntax

property OnException: TsgcExceptionEvent;
// TsgcExceptionEvent = procedure(Connection: TsgcWSConnection; E: Exception) of object

Default Value

Remarks

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.

Example

procedure TForm1.oPresenceException(Connection: TsgcWSConnection; E: Exception);
begin
  Memo1.Lines.Add('Exception: ' + E.Message);
end;

Back to Events