向连接器的用户显示的错误。
const cc = DataStudioApp.createCommunityConnector(); cc.newUserError() .setText('This is the debug error text.') .setDebugText('This text is only shown to admins.') .throwException();
方法
| 方法 | 返回值类型 | 简介 |
|---|---|---|
print | String | 输出此对象的 JSON 表示法。 |
set | User | 设置调试错误的文本,该文本仅向管理员显示。 |
set | User | 设置用户错误的文本。 |
throw | void | 触发抛出此异常。 |
详细文档
printJson()
输出此对象的 JSON 表示法。此方法仅用于调试。
返回
String
setDebugText(text)
setText(text)
throwException()
触发抛出此异常。