TsgcWSPServer_Presence › Events › OnException
Fired when an unhandled exception is caught while processing a Presence message.
property OnException: TsgcExceptionEvent;
// TsgcExceptionEvent = procedure(Connection: TsgcWSConnection; E: Exception) of object
—
Raised whenever an exception is thrown inside the server while handling a Presence frame or calling one of your event handlers. Use this event to log or recover from errors without tearing down the connection.
procedure TForm1.sgcWSPServer_Presence1Exception(Connection: TsgcWSConnection;
E: Exception);
begin
Log('#Exception ' + Connection.Guid + ': ' + E.Message);
end;