mirror of https://github.com/apache/poi.git
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
3b4e272ac2
commit
5d6ef0daa1
|
@ -110,7 +110,7 @@ public class FormulaParser {
|
||||||
private void Abort(String s) {
|
private void Abort(String s) {
|
||||||
Error(s);
|
Error(s);
|
||||||
//System.exit(1); //throw exception??
|
//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();
|
Ident();
|
||||||
} else if(look == '"') {
|
} else if(look == '"') {
|
||||||
StringLiteral();
|
StringLiteral();
|
||||||
|
} else if (look == ')' || look == ',') {
|
||||||
|
tokens.add(new MissingArgPtg());
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
String number = GetNum();
|
String number = GetNum();
|
||||||
|
|
Loading…
Reference in New Issue