improve error message on badly-formatted number

This commit is contained in:
Havoc Pennington 2011-11-10 20:50:46 -05:00
parent 43337aa315
commit da09c9790c

View File

@ -253,7 +253,8 @@ final class Tokenizer {
return Tokens.newLong(lineOrigin(), Long.parseLong(s));
}
} catch (NumberFormatException e) {
throw parseError("Invalid number", e);
throw parseError("Invalid number: '" + s
+ "' (if this is in a path, try quoting it)", e);
}
}