From: Mat Schaffer Date: 2006-08-27T15:13:09+09:00 Subject: Re: (again) Rescue clauses on do/end blocks? On 8/25/06, Hal Fulton wrote: > Rick DeNatale wrote: > > On 8/25/06, Mat Schaffer wrote: > > > >> Sorry to beat a dead horse, but I still have a question on the > >> optional 'begin' sentiment when rescuing exceptions. It seems like > >> the standing issue was with the use of it in brackets. Especially > >> when deciding which exception to catch or adding an ensure. > >> > >> Would this be unreasonable? > >> > >> foo { > >> blah > >> rescue ExceptionA > >> handle A > >> rescue ExceptionB > >> handle B > >> ensure > >> finish things > >> } > >> > > > > For one thing, it's syntactically incorrect, rescue can only appear > > inside either a begin block, or in a method def, where def methodname > > acts like begin for this purpose, or as a modifier on a single > > statement. > > Yes, but he's proposing a change in the syntax. Well re-proposing it anyway. I'm mostly curious if there's some fundamental problem with it that I'm not seeing. Since this particular syntax wasn't proposed the last time the discussion went around. -Mat