有没有办法处理 GOOGLE APPS SCRIPT 库的未定义方法?

Is there a way to handle undefined method of Library of GOOGLE APPS SCRIPT?

如果我有图书馆:MYLIB

我们都知道我们可以这样调用:MILIB.declarateMethod();

如果我从我的客户端代码调用 MILIB.unKnowMethod(); 它会 return 一些错误 ...

有没有办法像 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/noSuchMethod 并处理它 ???

---更新---

我想接到图书馆的电话... 如果我想打电话给 MILIB.Test1()MILIB.Test2() , 我想要

"Test1"

"Test2"

进入MILIB图书馆

将其包装在 try...catch 块中,根据需要在 catch.

中处理错误

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch