110,539
社区成员
发帖
与我相关
我的任务
分享
private function foo() as long
on error goto errHandler
exit function
errHandler:
debug.print "in foo()," ,err.description
LogMsg "in foo()," & err.description
foo = -1
end function
private int foo()
{
try
{
// 主体代码
}
catch(Exception ex)
{
LogMsg("in foo()," + ex.message);
return -1;
}
}
private void timer1_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
LogMsg("elapsed 正在运行...");
List<string> list;
list = GetRecorderList();
if (list.Count != 0)
{
foreach (string s in list)
{
LogMsg("正在处理" + s + "的数据...");
ImportToYingSi3(s);
}
}
}
private int foo()
{
try
{
// 主体代码
}
catch(Exception ex)
{
LogMsg("in foo()," + ex.message);
return -1;
}
}