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 8ae2b6184d
commit 6b19217c3d
1 changed files with 4 additions and 1 deletions

View File

@ -134,7 +134,10 @@ public final class FormulaParser {
/** Report What Was Expected */
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);
}