PDA

View Full Version : ExcRecord.CurrentModuleOptions.ShowExceptionDialog missing?


TonyFjordén
20-Dec-2005, 01:36 PM
In the manual the following example code exist.
But when I try to find it in the codecompletion in Delphi 7 it doesn't exist?
How do I prevent the built in dialog from popping?

/Tony

// Show exception dialog?

procedure MyNotify(ExcRecord: TEurekaExceptionRecord; var Handled: Boolean);

begin

ExcRecord.CurrentModuleOptions.ShowExceptionDialog :=

MessageBox(0, 'Do you want to show error details?', 'Question',

MB_YESNO or MB_ICONQUESTION or MB_TASKMODAL)=ID_YES;

end;

admin
27-Dec-2005, 05:43 PM
Hi,

TonyFjordén wrote:
> In the manual the following example code exist.
> But when I try to find it in the codecompletion in Delphi 7 it doesn't
> exist?
> How do I prevent the built in dialog from popping?
>
> /Tony
>
> // Show exception dialog?
>
> procedure MyNotify(ExcRecord: TEurekaExceptionRecord; var Handled:
> Boolean);
>
> begin
>
> ExcRecord.CurrentModuleOptions.ShowExceptionDialog :=
>
> MessageBox(0, 'Do you want to show error details?', 'Question',
>
> MB_YESNO or MB_ICONQUESTION or MB_TASKMODAL)=ID_YES;
>
> end;

I'm sorry it's a manual error.

As you can see at: http://www.eurekalog.com/docs/old4_5_xversion.html in
the next 5.x version same old property are changed.

Now to hide/show the Exception Dialog you must use the following code:

//----------------------------------------------------------------------

uses ExceptionLog, ECore, ETypes;

procedure TForm1.EurekaLog1ExceptionNotify(
EurekaExceptionRecord: TEurekaExceptionRecord; var Handled: Boolean);
begin
with EurekaExceptionRecord.CurrentModuleOptions do
begin
if (MessageBox(0, 'Do you want to show error details?', 'Question',
MB_YESNO or MB_ICONQUESTION or MB_TASKMODAL) = ID_YES) then
ExceptionDialogOptions := (ExceptionDialogOptions +
[edoShowExceptionDialog])
else
ExceptionDialogOptions := (ExceptionDialogOptions -
[edoShowExceptionDialog]);
end;
end;


//----------------------------------------------------------------------

--
Best regards...

Fabio Dell'Aria.
----------------
http://www.eurekalog.com
Catch every BUG, every time!