I want to upload previously saved reports to bugtracker without having a current exception.
I've had some partial success with this code:
Code: Select all
LException := madExcept.ImportBugReport('1');
with LException do
begin
CreateBugReport := False;
while BugReportHeader.ItemCount > 1 do BugReportHeader.Delete(0);
while BugReportSections.ItemCount > 0 do BugReportSections.Delete(0);
BugReportHeader.Add('contact name', 'placeholder'); -- leave one because getheader adds all the stuff back when ItemCount = 0
BugReportSections.Add('nothing', 'empty');
CreateBugReport := True;
BugTrackerTitle := 'Some old reports we found';
BugTrackerDescription := 'asdf';
end;
SendBugReport(LException.BugReport, LException.ScreenShot, AParentWnd, LException);
Code: Select all
contact name : placeholder
nothing:
empty
I was wondering if there some simpler way to have ME upload only the old bugreport file?
It would be useful to have a function that returns the path of stored bugreports file. For example, to test for it's existence and then ask the user if we could send unsent reports. Is there a way to get that path somehow?
Last resort would be to try and duplicate the function from how ME determines the location but ME could change it in future version.
With regards,
sn