TsgcWSPClient_FilesEvents › OnException

OnException Event

Fires when an unhandled exception is raised inside the subprotocol worker or QoS timer thread.

Syntax

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

Default Value

Remarks

Receives the original Exception object so you can log it or take corrective action (reconnect, retry). The subprotocol continues running after the handler returns; the exception is not propagated to the caller.

Example

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

Back to Events