[DUG] Related try..finally question

Rohit Gupta rohit at cfl.co.nz
Fri Jul 21 14:47:38 NZST 2006


Connor,

we do it two different ways.

1.  Nested try finally and try excepts, one for each object when the number 
of objects is small.

2.  When the number of objects is large.  Initialise each object to nil, then 
one try finally and one try except around the whole thing.


Date sent:      	Fri, 21 Jul 2006 14:26:25 +1200
From:           	"Conor Boyd" <Conor.Boyd at trimble.co.nz>
To:             	"NZ Borland Developers Group - Delphi List" <delphi at ns3.123.co.nz>
Subject:        	[DUG] Related try..finally question
Send reply to:  	NZ Borland Developers Group - Delphi List <delphi at ns3.123.co.nz>
	<mailto:delphi-request at ns3.123.co.nz?subject=unsubscribe>
	<mailto:delphi-request at ns3.123.co.nz?subject=subscribe>

[ Double-click this line for list subscription options ] 

I'm getting the impression here that a lot of people only have a 1:1
relationship between try.finallys and procedures/functions?

Sounds a bit dangerous.

Should realistically be a try..finally for each object you instantiate
in a method.

Comments, anyone?

C.

_______________________________________________
Delphi mailing list
Delphi at ns3.123.co.nz
http://ns3.123.co.nz/mailman/listinfo/delphi
Regards

Rohit

======================================================================
CFL - Computer Fanatics Ltd.  21 Barry's Point Road, AKL, New Zealand
PH    (649) 489-2280 
FX    (649) 489-2290
email rohit at cfl.co.nz  or  r.gupta at xtra.co.nz
======================================================================




More information about the Delphi mailing list