TsgcWSPServer_sgc › Events › OnException
Fires when an unhandled exception is raised while processing a connection.
property OnException: TsgcExceptionEvent;
// TsgcExceptionEvent = procedure(Connection: TsgcWSConnection; E: Exception) of object
—
Centralised hook for exceptions raised during connection handling or by the internal QoS timer. The exception has already been caught; if you want it to propagate further, re-raise it from the handler. E is owned by the component and becomes invalid after the event returns, so copy E.Message if you need to log it asynchronously.
procedure TForm1.oProtocolException(Connection: TsgcWSConnection; E: Exception);
begin
Memo1.Lines.Add('unhandled: ' + E.ClassName + ' - ' + E.Message);
end;