diff --git a/src/java/org/apache/poi/hssf/model/FormulaParser.java b/src/java/org/apache/poi/hssf/model/FormulaParser.java index 2819786ef6..106fc5cde3 100644 --- a/src/java/org/apache/poi/hssf/model/FormulaParser.java +++ b/src/java/org/apache/poi/hssf/model/FormulaParser.java @@ -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); }