Using Delphi 7, how can I get a string representing the stack-trace from an Exception
?
try
SomethingDodgy();
except
on E:Exception do begin
// print stack trace
Log.Write(/* ??? */);
end;
end;
I hear there's a GetStackTrace function in the latest delphi, but I can't find anything for delphi 7. No, upgrading is not an option :)
GetStackTrace
method in newer Delphi versions does not actually return a stack trace. You do need an external exception framework anyway. – Leshia