ich versuch grad verzweifelt den StackTrace einer Exception zu loggen. Ich hab folgende Funktion aus dem Wiki genommen:
Code: Alles auswählen
procedure DumpExceptionCallStack(E: Exception);
var
I: Integer;
Frames: PPointer;
Report: string;
begin
Report := 'Program exception! ' + LineEnding +
'Stacktrace:' + LineEnding + LineEnding;
if E <> nil then begin
Report := Report + 'Exception class: ' + E.ClassName + LineEnding +
'Message: ' + E.Message + LineEnding;
end;
Report := Report + BackTraceStrFunc(ExceptAddr);
Frames := ExceptFrames;
for I := 0 to ExceptFrameCount - 1 do
Report := Report + LineEnding + BackTraceStrFunc(Frames[I]);
ShowMessage(Report);
Halt; // End of program execution
end;
€: hm, schient ein Problem vom 64bit Compiler zu sein. Als 32bit Anwendung funktioniert es ohne Probleme...
MfG Bergmann.