Class DebugError
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Gỡ lỗiLỗi
Lỗi chỉ quản trị viên của trình kết nối mới nhìn thấy.
const cc = DataStudioApp.createCommunityConnector();
cc.newDebugError().setText('This is the debug error text.').throwException();
Tài liệu chi tiết
printJson()
In nội dung đại diện JSON của đối tượng này. Lựa chọn này chỉ dùng để gỡ lỗi.
Cầu thủ trả bóng
String
setText(text)
Đặt văn bản của lỗi gỡ lỗi, chỉ quản trị viên mới xem được.
Tham số
Tên | Loại | Mô tả |
text | String | Văn bản lỗi. |
Cầu thủ trả bóng
DebugError
– Đối tượng này, để tạo chuỗi.
throwException()
Kích hoạt trường hợp ngoại lệ này.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\u003cp\u003e\u003ccode\u003eDebugError\u003c/code\u003e is an error type visible only to connector admins, used for debugging purposes.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to set error text (\u003ccode\u003esetText\u003c/code\u003e), print the error as JSON (\u003ccode\u003eprintJson\u003c/code\u003e), and trigger the error (\u003ccode\u003ethrowException\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eAdmins can utilize \u003ccode\u003eDebugError\u003c/code\u003e to identify and resolve issues within the connector without exposing them to end-users.\u003c/p\u003e\n"]]],[],null,["# Class DebugError\n\nDebugError\n\nAn error that is only visible to admins of the connector.\n\n```javascript\nconst cc = DataStudioApp.createCommunityConnector();\n\ncc.newDebugError().setText('This is the debug error text.').throwException();\n``` \n\n### Methods\n\n| Method | Return type | Brief description |\n|---------------------------------------|-----------------|------------------------------------------------------------------|\n| [printJson()](#printJson()) | `String` | Prints the JSON representation of this object. |\n| [setText(text)](#setText(String)) | [DebugError](#) | Sets the text of the debug error, which is only shown to admins. |\n| [throwException()](#throwException()) | `void` | Triggers this exception to be thrown. |\n\nDetailed documentation\n----------------------\n\n### `print``Json()`\n\nPrints the JSON representation of this object. This is for debugging only.\n\n#### Return\n\n\n`String`\n\n*** ** * ** ***\n\n### `set``Text(text)`\n\nSets the text of the debug error, which is only shown to admins.\n\n#### Parameters\n\n| Name | Type | Description |\n|--------|----------|-----------------|\n| `text` | `String` | The error text. |\n\n#### Return\n\n\n[DebugError](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n### `throw``Exception()`\n\nTriggers this exception to be thrown."]]