Whoops, away with the fairy's today.Sorry about that.

Rob Martin
Software Engineer

phone 03 377 0495
fax 03 377 0496
web www.chreos.com
----- Original Message ----- 
From: "Robert martin" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
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
> web www.chreos.com
> ----- 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 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 := StrToInt(Text);
> >   except
> >     on EConvertError do begin
> >      Application.HandleException(Self);
> >      ShowMessage('The user did not get the message')
> >     end;
> > end
> >
> > Thanks, Gajo
> >
> >
> >
>
> --------------------------------------------------------------------------
> -
> >     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/

Reply via email to