-----Original Message-----
From: Conor Boyd [mailto:[EMAIL PROTECTED] 
Sent: Monday, 10 March 2003 4:45 p.m.
To: Multiple recipients of list delphi
Subject: RE: [DUG]: Is this ropey practice?

Hey Jeremy,

Check again - you missed the word EMPTY. ;-)

Structured exception handling (try..excepts, finally etc.) as found in
Delphi (and now the .NET languages) is what I would consider an essential
part of programming these days.

I will not use/allow the following structures:
try
        DoSomething;
except
        {Ignore all possible exceptions}
end;

or

try
        DoSomething;
except
        on Exception do;        {Swallow any exception}
end;

Actually, I will ALWAYS check for a specific class of exception in an
exception handler.

E.g. I would do

try
        DoSomething;
except
        on Exception do begin
                HandleException;
        end;
end;

instead of

try
        DoSomething;
except
        HandleException;                {This is a no-no for me too}
end;

Hope that clarifies things.

Cheers,

Conor
-----Original Message-----
From: vss [mailto:[EMAIL PROTECTED]

Conor. You OUTLAW try and except? is that right?

Thats kinda "Interesting"
How do you check a string that contains a date, IS a date?
i.e.

try
  StrToDate(mytString)
except
  Showmessage('opps that not a date')
end;

I know this is not a GREAT example but you get what I mean.
Are you saying that you write a long or complicated function ot 
procedure to parse the string and work out if its a date at all?
If this is the casse, surly the above is the more effienct.

I am making some assumptions here obviously.

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