Delphi 異常捕捉的一種方法

Delphi 異常捕捉的一種方法

使用TApplicationEvents控件

OnException()事件裏面添加異常處理代碼

If  E  is EOutOfMemory then // 內存不足

……

Else  if  E  is EAccessViolation then // 非法訪問內存

……

異常類型定義在SysUtils.pas單元

原文地址:https://www.cnblogs.com/hnxxcxg/p/2940747.html