[fpc-devel] very misleading error msg...
Sven Barth
pascaldragon at googlemail.com
Sat Nov 13 18:40:38 CET 2010
On 13.11.2010 14:59, Martin wrote:
> The illegal expression is ok.
> But why saying that "Except" was expected? Imho that is misleading,
> since the source can continue with anything else here
I can only assume the following:
Before an "except" or a "finally" the ";" is optional (like in every(?)
block). Thus after a statement without a ";" either a "finally" or an
"except" is expected and the compiler simply assumes that it's in a
"try...except" block first. Or it's just because "except" is declared
before "finally" in the token array which is kept ordered by token
length first and lexicographically second.
Regards,
Sven
More information about the fpc-devel
mailing list