向連接器使用者顯示的錯誤。
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()
觸發擲回這個例外狀況。