Stack trace in application.onexception
Posted: Fri Sep 21, 2018 11:33 am
Hello Madshi
Thank you for an excellent product! It works very well.
I would like to get stacktrace in Application.OnException for unhandled exceptions:
uses MadStackTrace;
procedure Tform1.AppException(Sender: TObject; E: Exception);
var s : string;
begin
s := MadStackTrace.StackTrace(true);
// s = '' 15 TForm1.AppException'#$D#$A' ... initialization'
// had hoped to see:
// S= '' 22 Tform1.Button1Click ...'
end;
It seems, that the stack is cleared prior to AppException is called?
I Know, I can make the madshisystem handle unhandled exceptions, but I would like to show the same error dialogue, that I use for handled exceptions (here I can get the correct stack dump)
How do I get the stack dump un unhandled exceptions?
Best regards
Thomas Riedel
Thank you for an excellent product! It works very well.
I would like to get stacktrace in Application.OnException for unhandled exceptions:
uses MadStackTrace;
procedure Tform1.AppException(Sender: TObject; E: Exception);
var s : string;
begin
s := MadStackTrace.StackTrace(true);
// s = '' 15 TForm1.AppException'#$D#$A' ... initialization'
// had hoped to see:
// S= '' 22 Tform1.Button1Click ...'
end;
It seems, that the stack is cleared prior to AppException is called?
I Know, I can make the madshisystem handle unhandled exceptions, but I would like to show the same error dialogue, that I use for handled exceptions (here I can get the correct stack dump)
How do I get the stack dump un unhandled exceptions?
Best regards
Thomas Riedel