Class UserError
ユーザーエラーコネクタのユーザーに表示されるエラー。
const cc = DataStudioApp.createCommunityConnector();
cc.newUserError()
.setText('This is the debug error text.')
.setDebugText('This text is only shown to admins.')
.throwException();
詳細なドキュメント
printJson()
このオブジェクトの JSON 表現を出力します。これはデバッグ専用です。
戻る
String
setDebugText(text)
デバッグ エラーのテキストを設定します。このテキストは管理者にのみ表示されます。
パラメータ
名前 | 型 | 説明 |
text | String | エラー テキスト。 |
戻る
UserError
- チェーン用のこのオブジェクト。
setText(text)
ユーザー エラーのテキストを設定します。
パラメータ
名前 | 型 | 説明 |
text | String | エラー テキスト。 |
戻る
UserError
- チェーン用のこのオブジェクト。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-12-22 UTC。
[null,null,["最終更新日 2024-12-22 UTC。"],[[["`UserError` is a class representing errors displayed to users of a connector in DataStudio."],["This class provides methods to set user-facing error messages and debug messages for administrators."],["`UserError` includes a `throwException()` method to trigger the error, halting execution."],["Methods like `setText()` and `setDebugText()` facilitate customization of error messages, supporting both user and admin perspectives."]]],["The `UserError` class allows developers to create and manage errors displayed to users of a data connector. Key actions include setting the user-facing error message using `setText()`, setting a separate admin-only debug message with `setDebugText()`, and triggering the error to be thrown using `throwException()`. The `printJson()` function outputs a JSON representation for debugging. Both `setText` and `setDebugText` can be chained.\n"]]