2

The bug report generated by MadExcept shows computer name and other such details which is a security concern. How can I modify the message and remove such values from it.

René Hoffmann
  • 2,766
  • 2
  • 20
  • 43
Khushi
  • 21
  • 2

1 Answers1

4

In your madExcept exception handler, you have access to the bug report header fields. A madExcept exception handler looks like this:

procedure ExceptionHandler(const exceptIntf: IMEException; var handled: boolean);

You can remove fields from the bug report header by operating on the supplied exceptIntf interface.

For instance define this helper function:

procedure RemoveField(const Fields: IMEFields; const FieldName: UnicodeString);
var 
  Index: Integer;
begin
  Index := exc.BugReportHeader.FindItem('computer name');
  if Index<>-1 then 
    Fields.Delete(Index);
end;

Then call it from inside your exception handler like this:

RemoveField(exceptIntf.BugReportHeader, 'computer name');
David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
  • Hello David, thanx for the answer. I am using CreateBugReport method to generate the bug report. How can I do with this? – Khushi Aug 08 '16 at 10:51
  • There are really many ways to do this. Remember that I don't have any knowledge of how you use ME. You could use `RegisterExceptionHandler` for instance. Or perhaps `RegisterBugReportCallback`. You have found the documentation? – David Heffernan Aug 08 '16 at 10:54