DIP65: Fixing Exception Handling Syntax
Brian Schott via Digitalmars-d
digitalmars-d at puremagic.com
Wed Jul 9 13:58:48 PDT 2014
On Wednesday, 9 July 2014 at 20:11:46 UTC, Walter Bright wrote:
> What the parser can do is do a lookahead on the ( ) to see if
> it matches the 'BasicType Identifier' grammar.
> Parser::isDeclaration() can be pressed into service to do that.
> This should resolve the issue without breaking code.
There are 25 instances of code that does not follow the
"BasicType Identifier" syntax for CatchParameter in Phobos alone.
std/exception.d:126: catch (AssertError) assert(0);
std/exception.d:132: catch (AssertError) assert(0);
std/exception.d:138: catch (AssertError) assert(0);
std/exception.d:144: catch (AssertError) assert(0);
std/exception.d:153: catch (AssertError) thrown = true;
std/exception.d:164: catch (AssertError) thrown = true;
std/exception.d:175: catch (AssertError) thrown = true;
std/exception.d:187: catch (AssertError) thrown = true;
std/exception.d:218: catch (T)
std/exception.d:247: catch (AssertError) assert(0);
std/exception.d:261: catch (AssertError) assert(0);
std/exception.d:269: catch (AssertError) assert(0);
std/socket.d:1406: catch (SocketException)
std/conv.d:1509: catch (E)
std/format.d:2359: catch (UTFException)
std/stream.d:1382: catch (Throwable)
std/stream.d:1419: catch (Throwable)
std/array.d:2768: catch (Exception) assert(0);
std/array.d:2781: catch (Exception) assert(0);
std/array.d:2844: catch (Exception) assert(0);
std/array.d:2858: catch (Exception) assert(0);
std/array.d:3085: catch (Exception) assert(0);
std/range.d:5107: } catch (Throwable) { /* It's supposed
to throw.*/ }
std/range.d:5402: } catch (Exception) {}
std/range.d:9007: catch (Throwable)
More information about the Digitalmars-d
mailing list