in case of null argument it is more intuitive to report the argument index by counting from 1.

This commit is contained in:
krasimir
2016-05-19 20:48:47 +00:00
parent 4996d5d90b
commit 1a0defc0fc

View File

@@ -40,7 +40,7 @@ public class Expr implements Serializable {
throw new IllegalArgumentException("fun == null");
for (int i = 0; i < args.length; i++) {
if (args[i] == null)
throw new IllegalArgumentException("the "+i+"th argument is null");
throw new IllegalArgumentException("the "+(i+1)+"th argument is null");
}
this.pool = new Pool();