Make IDE ignore Exception:

Tools -> Debugger Options

On Language Exceptions tab
Add the class name of whatever exceptions you want to ignore. Tick or
untick them if they are allready listed.

-----Original Message-----
From: Steve Peacocke [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 14 2003 9:36 a.m.
To: Multiple recipients of list delphi
Subject: Re: [DUG]: Handling exceptions


The simple exception works as follows...

procedure TForm1.Button1Click(Sender: TObject);
var i: integer;
begin
    try
        i := StrToInt(Edit1.text);
    except
        ShowMessage('Got Here!');
    end;
end;

However, it will give an exception in the Delphi IDE debugger, but not
in 
the application itself. In other words, only the "Got Here" message will
be 
shown when running from an EXE.

There is a way to switch off showing exceptions within the Delphi IDE
but I 
can's remember where at the moment and have not the time to look right
now.

So it's possible that your code does actually work, but as you are
running 
it in the Delphi IDE, all you are seeing is the debugger message.

Steve


------------------------------------------------------------------------
---
    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/

Reply via email to