D,
> However I can't work out whether the developer has much control over which
sorts of exceptions were handled by madExcept.
Well you have a couple of options here:
1. Treat all unhandled exceptions / errors as "exceptions"
This is what we do, which is that if we have not handled an exception then
it is an exception we want madSHI to do its thing. If we want to handle
something we put it in a try..except block.
2. Introduce your own Exception intercept handler into madSHI
Basically you can handle how exceptions are dealt with. Say popping up the
madSHI dialog box, not popping it up etc. We basically always enable the
continue button on the dialog so that if an exception happens very early in
app startup then we want to be able to still continue. Here is code snippet:
TNamMadShiCustomExceptions = class(NamTObject)
////////////////////////////////////////////////////////////////////////////
// The madSHI exception handling framework allows custom exception
handlers
// to be registered with it. This class contains some exception
handlers.
// NOTE: We may add the ability to send bug reports in other ways etc.
At
// that point we would add the additional methods and expose this class
// so that applications could choose what to do.
private
constructor Create;
destructor Destroy; override;
procedure Handler_AlwaysContinue(AFrozen : boolean; AExceptObject :
TObject;
AExceptAddr : pointer; var ABugReport : string; var ACanContinue :
boolean;
var AHandled : boolean);
end;
procedure TNamMadShiCustomExceptions.Handler_AlwaysContinue(AFrozen :
boolean;
AExceptObject : TObject; AExceptAddr : pointer; var ABugReport : string;
var ACanContinue, AHandled : boolean);
////////////////////////////////////////////////////////////////////////////
////
// PURPOSE: madSHI has the annoying habit of disabling the continue button.
// While this is correct in 99% of cases it is not always correct. In order
to
// give our applications the best chance of continuing we always set it to
enabled
// HISTORY:
// DJE 12/03/2003 # Initial Creation
begin
if not ACanContinue then
begin
StrPCopy(ContinueApp, 'continue application');
ACanContinue := TRUE;
end;
//ALWAYS show that the madSHI handlers must still do their work
AHandled := FALSE;
end;
> Is this possible with the madExcept tools?
So basically. Yes.
-- D
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of David Brennan
Sent: Wednesday, 19 November 2003 09:40
To: Multiple recipients of list delphi
Subject: RE: [DUG]: Debug
Donovan,
I've had a look at the madshi website before and it looks quite interesting.
However I can't work out whether the developer has much control over which
sorts of exceptions were handled by madExcept. Many of the exceptions raised
by our applications are informational and not serious errors. For example
entering a string instead of an integer might raise an invalid integer
conversion exception, or we might raise an exception if the user tries
saving a record without entering certain fields.
Obviously we don't want these informational/program control exceptions to
appear in an error dialog complete with options to send call stacks etc. We
would want these exceptions to be handled with a normal looking error dialog
and only certain exceptions (such as access violations, divide by zero,
invalid pointer etc) to use the advanced dialog.
Is this possible with the madExcept tools?
David.
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of Donovan J. Edye
> Sent: Wednesday, 19 November 2003 11:15 AM
> To: Multiple recipients of list delphi
> Subject: RE: [DUG]: Debug
>
>
> A,
>
> You may also want to check out http://www.madshi.net/ (madExcept) an
> excellent aid to debugging and exception handling.
>
> -- D
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Alistair George
> Sent: Wednesday, 12 November 2003 11:26
> To: Multiple recipients of list delphi
> Subject: [DUG]: Debug
>
> When I close my app it comes up with the following:
> 'External exception C0000008'
> Then:
> 'Runtime error 216 at 000031F8'
> I've got debugging turned on, map file etc.
> Read somewhere I can key in the above to find where the error
> occurred but
> cant
> recall where it was.
> Would it be possible the the IDE does not display the offending
> line because
> it
> is in a Library component that does not have source?
> Anyone help?
> Thanks,
> Alistair+
>
>
> ------------------------------------------------------------------
> ---------
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
>
>
> ------------------------------------------------------------------
> ---------
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/