Minor patch to improve FormulaParser error messages like those from bug 45041

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@658033 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Josh Micich 2008-05-19 23:07:27 +00:00
parent 89826ea9b4
commit d6d5b97ad2

View File

@ -134,7 +134,10 @@ public final class FormulaParser {
/** Report What Was Expected */ /** Report What Was Expected */
private RuntimeException expected(String s) { private RuntimeException expected(String s) {
return new FormulaParseException(s + " Expected"); String msg = "Parse error near char " + (pointer-1) + "'" + look + "'"
+ " in specified formula '" + formulaString + "'. Expected "
+ s;
return new FormulaParseException(msg);
} }