<syntaxhighlight lang="delphi"> type TAppServerBgExceptionEvent = procedure (Sender : TObject;
E : Exception) of object;
property OnServerBgException : TAppServerBgExceptionEvent; </syntaxhighlight>
Occurs when an exception in server socket occurs in the background.
The OnBgException event is triggered when an exception occurs in the background (occuring in an event handler called from the message pump). If not handled, those exceptions are simply ignored. It is interesting to handle this exception, at least to record it to some log file. It may happend that some exception affect winsock in such a way that no client is able to connect again. You can Stop and Start the server to solve that problem.