errorinfo 只在操作符返回 false 时加入errorList
runner.addOperator("add",new addOperator());
runner.getOperatorFactory().getOperator("add").setErrorInfo("$1 加法错误");
class addOperator extends Operator {
public Object executeInner(Object[] list) throws Exception {
Object opdata1 = list[0];
Object opdata2 = list[1];
return Integer.parseInt(opdata1.toString()) +
Integer.parseInt(opdata2.toString());
}
}