Skip to content

Commit cf51860

Browse files
committed
修改代码
1 parent dd7d860 commit cf51860

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

csharp/ToolGood.Algorithm2/AlgorithmEngine.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,17 @@ public double TryEvaluate(string exp, double def)
133133
public string TryEvaluate(string exp, string def)
134134
{
135135
if (Parse(exp)) {
136-
//try {
136+
try {
137137
var obj = Evaluate();
138138
obj = obj.ToString("");
139139
if (obj.IsError) {
140140
LastError = obj.ErrorMsg;
141141
return def;
142142
}
143143
return obj.StringValue;
144-
//} catch (Exception ex) {
145-
// LastError = ex.Message;
146-
//}
144+
} catch (Exception ex) {
145+
LastError = ex.Message;
146+
}
147147
}
148148
return def;
149149
}

0 commit comments

Comments
 (0)