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:
parent
8a926c028c
commit
c371aa983d
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user