Closed maxkleiner closed 6 months ago
add JclStackInfoList: TJclStackInfoList; to baselib: function GetCallStack: String; var JclStackInfoList: TJclStackInfoList; StringList: TStringList; begin JclStackInfoList := JclCreateStackList(True, 3, Caller(0, False)); try StringList := TStringList.Create; try JclStackInfoList.AddToStrings(StringList, True, False, True, True); Result := StringList.Text; finally StringList.Free; end; finally JclStackInfoList.Free; end; end;
https://stackoverflow.com/questions/43774927/delphi-trying-to-get-stacktrace-for-an-exception
add JclStackInfoList: TJclStackInfoList; to baselib: function GetCallStack: String; var JclStackInfoList: TJclStackInfoList; StringList: TStringList; begin JclStackInfoList := JclCreateStackList(True, 3, Caller(0, False)); try StringList := TStringList.Create; try JclStackInfoList.AddToStrings(StringList, True, False, True, True); Result := StringList.Text; finally StringList.Free; end; finally JclStackInfoList.Free; end; end;