From: Dirk Detering Date: 2002-07-09T18:54:27+09:00 Subject: Re: for ... else ... end Sean Chittenden schrieb: > > And what do you suggest with 'ensure' ("done looping") > > here? > > ensure should catch break... break strikes me as being > identical to an exception that's caught at the end of > the loop. *question-mark above my head* But ... this does not correlate to the 'ensure' semantic in begin...end. There the ensure does not catch anything. On the contrary it declares coding to run _everytime_ , *not* regarding exceptions or success. (And to answer my own question: Regarding the Pickaxe it runs also for _uncaught_ exceptions, in which case the code following the end would _not_ be executed). > Truthfully though, I > was more excited about catching the case when a loop wasn't entered > (ex: 0 rows from the DB), vs when a break is thrown. > If you want an > "else", then use a normal exception block... You mean catch/throw ? As I've been taught in this thread that catch/throw is for flow control and exception for error handling. > though it is nice sugar > to have in the language I suppose (albeit slightly confusing to the > uninformed). <:~) -sc Yes ... that's exactly why we talk about keywords and semantics ... Bye Det