TsgcQUICServer › 事件 › OnQUICException
在处理 QUIC 连接或监听器时发生未处理异常时触发。
property OnQUICException: TsgcQUICServerExceptionEvent;
// TsgcQUICServerExceptionEvent = procedure(Sender: TObject; const aConnection: TsgcQUICServerConnection; const aException: Exception) of object
—
OnQUICException 在服务器的后台抽取线程在接受连接、推进握手、读取流或运行事件处理程序时捕获到异常时触发。aConnection 参数标识错误相关的会话,对于不与单条连接绑定的监听器级故障则为 nil。aException 参数保存错误信息,以便应用程序记录或采取恢复措施;服务器继续运行,因此处理此事件可防止故障被忽视。
procedure OnQUICExceptionEvent(Sender: TObject; const aConnection: TsgcQUICServerConnection; const aException: Exception);
begin
Log('QUIC error: ' + aException.Message);
end;