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
: 연결을 위한 객체입니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 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"]]