Thanks!!!!

That was indeed the bugger!!! (though the file name was AppEvnts... pretty
close though!!)

Help muchly appreciated!!

Regards

Colin

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Nahum Wild
Sent: Monday, 7 August 2000 4:15 pm
To: Multiple recipients of list delphi
Subject: RE: [DUG]: Exceptions not getting caught


I had a problem with exactly the same symptoms.  I did manage to solve it
and posted a 'how to' to this list a bit before christmass 1999.  I've
included below, hope it helps...


Nahum Wild
Game Designer
Realism Ltd

Pre-Register now for the ESDAO beta test!
http://www.esdao.net


------------------------------------------

In D5 there is a new non-visual component under the Additional tab called
TApplicationEvents.  This allows you to hook into the global Application var
events through the TApplicationEvents events oldly enough.  I was checking
out the ability to easily add exception handlers for indvidual forms and
when I finished with it I deleted the component from the form.  But it still
left the reference to AppEvents.pas in the forms uses clause.  This is where
the problem occured.

For some unknown reason by just having that pas referenced, but not being
used directly by me, it was adding its own eventhandler by hooking into
Application.OnException.  It was then doing nothing when an exception was
raised by my app!  It was not even showing the exception message to me!  The
only way I could find out about any exceptions (including asserts as they
are exceptions) was to be running under the IDE and seeing them occur.  It
was effectivly supressing the exceptions.  The way to solve this is to just
simply remove the AppEvents.pas reference in the uses clause.

Anyway I thought that I would warn you all so you don't end up wasting a
large amount of time with it like I have.

Also, don't ALT+F12 a TFrame, do some editing like change component types
then ALT+F12 again because it frags part of the projects settings, including
all compiler, linker and path ones!

I think that the addage of 'New features in Delphi won't be stable till the
next version or big patches comes out' still applies, even to D5. <sigh>

------------------------------------------

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Colin Fraser
> Sent: Monday, August 07, 2000 15:12
> To: Multiple recipients of list delphi
> Subject: [DUG]: Exceptions not getting caught
>
>
> Hi all,
>
> I have an app that when an exception occurs, it does get caught if you put
> in try finally or on Exception (etc) but if you don't handle it, it simply
> disappears... the default behaviour does not seem to occur.
>
> I can put a raise Exception.Create on a button on a form and
> execute it, and
> nothing happens (In the IDE Delphi does break for it, but outside
> of the IDE
> it does nothing (and the code following it does not execute either, so
> something is happening))...
>
> Just wondering if there is a way to turn the default exception handling on
> or off...
>
> I have looked through the compiler directives but have not found
> anything...
>
> The app has a few third party controls... just wondering if they have
> somehow turned off the default exception handling.
>
> Thanks for any help.
>
> Colin
>
>
> ------------------------------------------------------------------
> ---------
>     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

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

Reply via email to