1. when formula parse fails, reported error now includes the "pointer"

2. added the case of interpreting a missing argument as MissingArgPtg

git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@434426 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Amol S. Deshmukh 2006-08-24 16:42:52 +00:00
parent 8a926c028c
commit c371aa983d
1 changed files with 3 additions and 1 deletions

View File

@ -110,7 +110,7 @@ public class FormulaParser {
private void Abort(String s) {
Error(s);
//System.exit(1); //throw exception??
throw new RuntimeException("Cannot Parse, sorry : "+s + " [Formula String was: '"+formulaString+"']");
throw new RuntimeException("Cannot Parse, sorry : " + s + " @ " + pointer + " [Formula String was: '" + formulaString + "']");
}
@ -493,6 +493,8 @@ public class FormulaParser {
Ident();
} else if(look == '"') {
StringLiteral();
} else if (look == ')' || look == ',') {
tokens.add(new MissingArgPtg());
} else {
String number = GetNum();