以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  如何解决运行函数的错误?  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=117501)

--  作者:ap9709130
--  发布时间:2018/4/13 15:12:00
--  如何解决运行函数的错误?
老师

我的代码:

try
    Functions.Execute("aa")
Catch ex As Exception
    Output.show(1)
End Try

我现在的项目函数都是动态加载的,不知道什么原因,有时候会加载不成功,也不报错.但运行函数时就会说找不到函数aa,我想把这个错误去掉,但代码不起作用?

--  作者:有点甜
--  发布时间:2018/4/13 15:22:00
--  

判断函数是否存在

 

try
    Functions.add("test", "dim a=123")
    Functions.remove("test")
    msgbox("不存在,继续执行")
catch ex As exception
    msgbox("已存在")
End try