LOL, thanks for all the answers. So, there wasn't a problem after all. I
tried writing the exception but got an error, then searched in the Help for
some clues and found the HandleException, that's how it got there. So, my
app was working in the first place, only that the debugger gave an error
mes
Also have a look at the val function
Neven
- Original Message -
From: "gajo" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Tuesday, October 14, 2003 8:52 AM
Subject: [DUG]: Handling exceptions
> Hi,
>
&
IIRC Tools, Debugger Options, IDE tab.
Nope, code won't work, 'cos of the call to App.HandleException ;-)
HTH,
Conor
-Original Message-
From: Steve Peacocke [mailto:[EMAIL PROTECTED]
[snip]
There is a way to switch off showing exceptions within the Delphi IDE
but I
can's remember whe
TECTED]>
Sent: Tuesday, October 14, 2003 9:16 AM
Subject: Re: [DUG]: Handling exceptions
> aNum := InttoStrDef(SomeText, -1);
>
> if (aNum <> -1) then begin
>
>
> end;
>
> Rob Martin
> Software Engineer
>
> phone 03 377 0495
> fax 03 377 0496
> w
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
urn 123
HTH Jeremy
-Original Message-
From: "Paul Mckenzie" <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Date: Tue, 14 Oct 2003 09:15:17 +1300
Subject: Re: [DUG]: Handling exceptions
> This is in D6 HTH
>
> Converts a string that r
Your code is nearly correct.
However, you don't need the call to Application.HandleException - this is presumably
what is still showing you the unwanted error message.
You don't need the call because by writing a try..except block, you are handling the
exception yourself - in this case, by not
lt;[EMAIL PROTECTED]>
Sent: Tuesday, October 14, 2003 8:52 AM
Subject: [DUG]: Handling exceptions
> Hi,
>
> I have to convert a string to integer. When a string is not correct, then
> the StrToInt procedure raises an exception, and the user gets an error
> message.
>
> I w
True;
end;
Regards
Jason
-Original Message-
From: gajo [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 14 October 2003 8:52 a.m.
To: Multiple recipients of list delphi
Subject: [DUG]: Handling exceptions
Hi,
I have to convert a string to integer. When a string is not correct,
then
the St
a number');
- Original Message -
From: "gajo" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi"
<[EMAIL PROTECTED]>
Sent: Tuesday, October 14, 2003 8:52
AM
Subject: [DUG]: Handling
exceptions
> Hi,> > I have to convert a
string to i
Message -
From: "gajo" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Tuesday, October 14, 2003 8:52 AM
Subject: [DUG]: Handling exceptions
> Hi,
>
> I have to convert a string to integer. When a string is not corr
Hi,
I have to convert a string to integer. When a string is not correct, then
the StrToInt procedure raises an exception, and the user gets an error
message.
I would like to prevent the error message from being displayed. How can I do
that?
I was trying the following with no results:
try
a :=
lington [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 19 August 2003 09:17
To: Multiple recipients of list delphi
Subject: RE: [DUG]: Handling Exceptions
Hmm,
If you debug, I would like to know the values causing the issue.
What you are saying - should not happen. However we had a similar case
recently
watson etc . Ie nothing - just disappeared from
the task manager - fastest program close I have ever seen.
Myles.
-Original Message-
From: Vaughan, Benjamin Carl [mailto:[EMAIL PROTECTED]
Sent: Monday, 18 August 2003 15:02
To: Multiple recipients of list delphi
Subject: [DUG]: Handling
Hi All,
I have currently been working on an Exception handler for one of my
applications and was giving it some test cases.
I have found some exceptions that can not be handled..
e.g
var
aList : TStringList;
begin
Showmessage(aList.Text);
end;
This sort of exception basically exits you out
15 matches
Mail list logo