TAssertErrorProc = procedure (const Message, Filename: string;
LineNumber: Integer; ErrorAddr: Pointer);
也就是可以这么写:
设置AssertErrorProc := @OutputLineNumber;
procedure OutputLineNumber(const Msg, Filename: string; LineNumber: Integer; ErrorAddr: Pointer);
使用:捕捉到错误之后用assert方式进行输出日志,就能抓到是哪行代码报错了