catch without block/scope brackets

Downs default_357-line at yahoo.de
Wed Sep 5 00:52:56 PDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

mwarning wrote:
> Jakob Wrote:
>> But i also tried
>>
>> catch()
>> 	foo();
>>
>> and it errored, even though this wouldn't be ambigous
>>
> I guess it was a decision to not allow catch without curly brackets at all
> to avoid a potential ambiguity.
That's odd, because that kind of catch is in the spec.
http://digitalmars.com/d/1.0/statement.html, TryStatement, under LastCatch.
Allow me to quote:

Catches:
	LastCatch
	Catch
	Catch Catches

LastCatch:
	catch NoScopeNonEmptyStatement

Looks like a bug.
 --downs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG3mBYpEPJRr05fBERAhuCAJ9Lphr42id09APcTA+dT67h09uytQCgpDz1
xMTRqN2sFmtOFR9z/wOu5Js=
=a3WN
-----END PGP SIGNATURE-----



More information about the Digitalmars-d mailing list