Hi, I use RegisterExceptionHandler to send additional attachments to bug report and it works fine. How can I notify the user that the bug report was sent succesfully to our email server? I send bug report by smtp as smtp client.
thanks.
How to notify the user...
I'm not using the madExcept component. I use a conditional compile to include the units then apply the madexceptpatch. So, I use RegisterExceptionHandler just to modify the settings at runtime: e-mail, username, password, etc and let madExcept to send the bug report by email. After sending the report, I need to notify the user that email has been sent. How can I get access to OnExceptAction if i don't have the component on the form ? Thank you.
You said you're calling RegisterExceptionHandler. In the same way you can call RegisterExceptActionHandler. Please reread my previous comment. I was not talking about using the madExcept component. What I said there is still valid. You can do all that at runtime, regardless of whether you're using madExceptPatch or not.
My fault, sorry. In the initialization part of the unit i have
RegisterExceptActionHandler(MyActionHandler,stDontSync);
Then i have:
procedure MyActionHandler(Action:TExceptAction;
const exceptIntf : IMEException;
var handled : boolean);
var bTRansmited:TextBool;
begin
if Action=eaSendBugReport then
begin
// MESettings for smtp client
bTRasmited = madexcept.SendBugReport ('',exceptintf.ScreenShot,0,madexcept.MESettings);
if boolean(bTransmited) then
MessageBox(0, 'Bug reported successfully!', '', MB_ICONINFORMATION or MB_OK);
end;
end;
The problem is that the mesagebox shows up BEFORE the SendbugReport finishes its job. What can I do to notify to user AFTER the bug is sent ? Thank you!
RegisterExceptActionHandler(MyActionHandler,stDontSync);
Then i have:
procedure MyActionHandler(Action:TExceptAction;
const exceptIntf : IMEException;
var handled : boolean);
var bTRansmited:TextBool;
begin
if Action=eaSendBugReport then
begin
// MESettings for smtp client
bTRasmited = madexcept.SendBugReport ('',exceptintf.ScreenShot,0,madexcept.MESettings);
if boolean(bTransmited) then
MessageBox(0, 'Bug reported successfully!', '', MB_ICONINFORMATION or MB_OK);
end;
end;
The problem is that the mesagebox shows up BEFORE the SendbugReport finishes its job. What can I do to notify to user AFTER the bug is sent ? Thank you!
Make sure you deactivate the option "send bug report in background". See here:
http://help.madshi.net/madExceptSettings5.htm
http://help.madshi.net/madExceptSettings5.htm