Well I started getting AV's in strang places on a working app so I debugged
it and found this to be the problem.  Maybe the AV's were caused by
something else and debugging misled me to this.  Either way, the original
casue of the Exception has been cured so it's gone away - for now...






"Dennis Chuah" <[EMAIL PROTECTED]> on 07/05/99 12:15:55

Please respond to [EMAIL PROTECTED]

To:   Multiple recipients of list delphi <[EMAIL PROTECTED]>
cc:    (bcc: Peter Jones/Logistics&Information
      Technology/Christchurch/Foodstuffs)
Subject:  RE: [DUG]:  Bizarre bug of the day





Peter,

How are you testing for a Nil pointer?  Also check the ExceptObject value.
I have never come across this problem, except when I am debugging - if I
have break on exception, and if I have optimisation turned on (ought to
really turn this off when debugging) or stack frames turned off, Delphi can
sometimes get confused and refuse to give me correct values for program
variables.  Sometimes it gives me the wrong scope.  I also use a slightly
different approach:

try
  ...
except
  with Exception(ExceptObject) do ...
end;


Dennis.

-----------------------------------------------------
Dennis Chuah, BE (Hons) [mailto:[EMAIL PROTECTED]]
Manager, Product Development
Contec Data Systems Ltd. [http://www.contecds.com]
tel: +64-3-3580060 ext-775 fax: +64-3-3588045


> Doing the following :
>     Except
>       On E : Exception Do
>
> Sometimes gives me an empty (nil) E enen though I have
> explicityly created
> an exception using raise Exception.Create.



---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz






---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to