I am Registering and Except Action Handler that needs to add a few Additional fields to the bug reports. These are pulled out into a custom script that adds the item to our ticketing system.
I'd like to add the main thread callstack (or better yet the first X lines of the call stack) to our description field. I was thinking there should be a utility function or some code I could copy to print the TStackItem as a string... but I can't seem to find it.
Does something exist or do I just need to roll my own?
Thanks,
Mark
Here is my function
Code: Select all
procedure MadExceptSetTitle(action: TExceptAction; const exceptIntf: IMEException; var handled: boolean);
{^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^}
begin
if action <> eaSendBugReport2 then
exit;
exceptIntf.BeginUpdate;
exceptIntf.AdditionalFields.Add('product', 'DataLog');
exceptIntf.AdditionalFields.Add('subject', 'DataLog Except: ' + LeftStr(exceptIntf.ExceptMessage, 75));
exceptIntf.AdditionalFields.Add('description', exceptIntf.ExceptMessage + '<br><br>'
+ exceptIntf.BugTrackerDescription + '<br><br>'
+ exceptIntf.Callstacks[0].ToString); // <<-- This is what I can't find.
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^
exceptIntf.EndUpdate;
handled := false;
end;