Using raise without MadExcept getting involved

delphi package - automated exception handling
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Yeah, that'd be helpful, thanks!
paulcoshott
Posts: 9
Joined: Fri Aug 13, 2004 9:47 am
Location: Australia

Post by paulcoshott »

OK, I have the results. By including "Exception Location Disassembly" on the bug report tab, it seems to take 3-5 seconds for the exception to show (either mad Except's one or mine from the ExceptionFilterUnit).

If I add mail capabilities by ticking "Contact the mail client via MAPI", then madExcepts dialog appears quickly, but the exceptions raised by my filter unit take about 60 seconds. If I include mail via MailTo (and not via MAPI), there doesn't seem to be a problem. I haven't tried the SMTP options.

Hope this helps.

I have decided I will purchase madExcept. It's doing everything I need and the support is excellent. Thanks.
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Hi Paul,

are you using the latest version? The disassembly consumed a lot of time when the crashing function was very long in older madExcept versions. But in newer versions it should be quite fast. How long is the function in which the exception was raised?

About mailing: What do you mean with "the exceptions raised by my filter"? That confuses me a bit...
paulcoshott
Posts: 9
Joined: Fri Aug 13, 2004 9:47 am
Location: Australia

Post by paulcoshott »

Using version 2.7b.
Could there be an issue with the speed while running the program inside the ide ? All my previous tests were in the ide and removing the mail via MAPI seemed to work. But I tested it again just now and my machine ground to a halt. I clicked on a few things trying to get something to work, and then had to leave it about 10 minutes to let it catch up to a point when I could click OK on the error dialog (from my ExceptionFilterUnit). Then I tried running it outside the ide and everything was fine.

Another question : is there a way to turn madExcept off and on at runtime ?


>> About mailing: What do you mean with "the exceptions raised by my filter"? That confuses me a bit...

I was talking about the ExceptionFilterUnit.

-----------------------------------------------
unit ExceptionFilterUnit;

interface

uses
Windows, SysUtils, DBISAMTb;

implementation

uses madExcept, Main;

procedure ExceptionFilter(frozen : boolean;
exceptObject : TObject;
exceptAddr : pointer;
crashedThreadId : dword;
var bugReport : string;
var screenShot : string;
var canContinue : boolean;
var handled : boolean);
begin
if exceptObject <> nil then begin
//now test any exceptions tht should be captured
if exceptObject is TE_Error then begin
MessageBox(0, pchar(TE_Error(exceptObject).Message), 'Tile Essentials Error', MB_ICONERROR);
Handled := True;
end else if exceptObject is EDBISAMEngineError then begin
MessageBox(0, pchar(EDBISAMEngineError(exceptObject).Message), 'Database Engine Error', MB_ICONERROR);
Handled := True;
end;
end;
end;


initialization
RegisterExceptionHandler(ExceptionFilter, false);

end.
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Do you have "automatically mail bug report" turned on?

Please try turning "pause all running delphi/bcb threads" off. That might get rid of the freeze.

It's not possible to turn madExcept off dynamically for your program when it runs inside of the IDE. But it's possible to tell madExcept to not catch exceptions that are raised by the Delphi IDE. But I guess that's not what you meant?
paulcoshott
Posts: 9
Joined: Fri Aug 13, 2004 9:47 am
Location: Australia

Post by paulcoshott »

I turned off the Pause all threads and have not had a freeze so far.

How do you turn off madExcept inside the delphi IDE ? (So it doesn't catch delphi's exceptions).

Cheers,
Paul
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

>> How do you turn off madExcept inside the delphi IDE ? (So it doesn't catch delphi's exceptions).

Just remove the package "madExceptIde_.bpl" from the list of installed packages.
Post Reply