Class DebugError
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
DebugErrore
Un errore visibile solo agli amministratori del connettore.
const cc = DataStudioApp.createCommunityConnector();
cc.newDebugError().setText('This is the debug error text.').throwException();
Metodi
Metodo | Tipo restituito | Breve descrizione |
printJson() | String | Stampa la rappresentazione JSON di questo oggetto. |
setText(text) | DebugError | Imposta il testo dell'errore di debug, che viene mostrato solo agli amministratori. |
throwException() | void | Attiva l'eccezione. |
Documentazione dettagliata
printJson()
Stampa la rappresentazione JSON di questo oggetto. Questo è solo per il debug.
Invio
String
setText(text)
Imposta il testo dell'errore di debug, che viene mostrato solo agli amministratori.
Parametri
Nome | Tipo | Descrizione |
text | String | Il testo dell'errore. |
Invio
DebugError
: questo oggetto, per l'accodamento.
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-26 UTC.
[null,null,["Ultimo aggiornamento 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."]]