aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/webglrenderingcontext/geterror
diff options
context:
space:
mode:
authorjulieng <julien.gattelier@gmail.com>2021-10-02 17:20:24 +0200
committerSphinxKnight <SphinxKnight@users.noreply.github.com>2021-10-02 17:30:20 +0200
commit1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde (patch)
tree30a56efd3eff3a01bd1611e1840fdbbfacf544a4 /files/fr/web/api/webglrenderingcontext/geterror
parentc05efa8d7ae464235cf83d7c0956e42dc6974103 (diff)
downloadtranslated-content-1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde.tar.gz
translated-content-1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde.tar.bz2
translated-content-1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde.zip
convert content to md
Diffstat (limited to 'files/fr/web/api/webglrenderingcontext/geterror')
-rw-r--r--files/fr/web/api/webglrenderingcontext/geterror/index.md136
1 files changed, 45 insertions, 91 deletions
diff --git a/files/fr/web/api/webglrenderingcontext/geterror/index.md b/files/fr/web/api/webglrenderingcontext/geterror/index.md
index 1e3d624e40..cd310e0a29 100644
--- a/files/fr/web/api/webglrenderingcontext/geterror/index.md
+++ b/files/fr/web/api/webglrenderingcontext/geterror/index.md
@@ -9,97 +9,51 @@ tags:
- WebGLRenderingContext
translation_of: Web/API/WebGLRenderingContext/getError
---
-<div>{{APIRef("WebGL")}}</div>
-
-<p>La méthode <strong><code>WebGLRenderingContext.getError()</code></strong> de l'<a href="/fr-Fr/docs/Web/API/WebGL_API">API WebGL</a> retourne des informations d'erreur.</p>
-
-<h2 id="Syntaxe">Syntaxe</h2>
-
-<pre class="syntaxbox">GLenum <var>gl</var>.getError();
-</pre>
-
-<h3 id="Paramètres">Paramètres</h3>
-
-<p>Aucun.</p>
-
-<h3 id="Valeur_retournée">Valeur retournée</h3>
-
-<table class="standard-table">
- <thead>
- <tr>
- <th scope="col">Constante</th>
- <th scope="col">Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><code>gl.NO_ERROR</code></td>
- <td>Aucune erreur n'a été enregistrée. La valeur de cette constante est 0.</td>
- </tr>
- <tr>
- <td><code>gl.INVALID_ENUM</code></td>
- <td>Une valeur non acceptable a été spécifiée pour un argument énuméré. La commande est ignorée et l'indicateur d'erreur est positionné.</td>
- </tr>
- <tr>
- <td><code>gl.INVALID_VALUE</code></td>
- <td>Un argument numérique est hors de sa plage. La commande est ignorée et l'indicateur d'erreur est positionné.</td>
- </tr>
- <tr>
- <td><code>gl.INVALID_OPERATION</code></td>
- <td>La commande indiquée n'est pas permise dans l'état courant. La commande est ignorée et l'indicateur d'erreur est positionné.</td>
- </tr>
- <tr>
- <td><code>gl.INVALID_FRAMEBUFFER_OPERATION</code></td>
- <td>Le tampon d'images actuellement lié n'est pas complet lors d'une tentative de rendu ou de relecture.</td>
- </tr>
- <tr>
- <td><code>gl.OUT_OF_MEMORY</code></td>
- <td>Plus assez de mémoire restante pour exécuter la commande.</td>
- </tr>
- <tr>
- <td><code>gl.CONTEXT_LOST_WEBGL</code></td>
- <td>Si le contexte WebGL est perdu, cette erreur est retournée lors du premier appel à <code>getError</code>. Après cela et jusqu'à ce que le contexte soit restauré, elle retourne <code>gl.NO_ERROR</code>.</td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="Exemples">Exemples</h2>
-
-<pre class="brush: js">gl.getError(); // gl.NO_ERROR (0)
+{{APIRef("WebGL")}}
+
+La méthode **`WebGLRenderingContext.getError()`** de l'[API WebGL](/fr-Fr/docs/Web/API/WebGL_API) retourne des informations d'erreur.
+
+## Syntaxe
+
+ GLenum gl.getError();
+
+### Paramètres
+
+Aucun.
+
+### Valeur retournée
+
+| Constante | Description |
+| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `gl.NO_ERROR` | Aucune erreur n'a été enregistrée. La valeur de cette constante est 0. |
+| `gl.INVALID_ENUM` | Une valeur non acceptable a été spécifiée pour un argument énuméré. La commande est ignorée et l'indicateur d'erreur est positionné. |
+| `gl.INVALID_VALUE` | Un argument numérique est hors de sa plage. La commande est ignorée et l'indicateur d'erreur est positionné. |
+| `gl.INVALID_OPERATION` | La commande indiquée n'est pas permise dans l'état courant. La commande est ignorée et l'indicateur d'erreur est positionné. |
+| `gl.INVALID_FRAMEBUFFER_OPERATION` | Le tampon d'images actuellement lié n'est pas complet lors d'une tentative de rendu ou de relecture. |
+| `gl.OUT_OF_MEMORY` | Plus assez de mémoire restante pour exécuter la commande. |
+| `gl.CONTEXT_LOST_WEBGL` | Si le contexte WebGL est perdu, cette erreur est retournée lors du premier appel à `getError`. Après cela et jusqu'à ce que le contexte soit restauré, elle retourne `gl.NO_ERROR`. |
+
+## Exemples
+
+```js
+gl.getError(); // gl.NO_ERROR (0)
gl.enable(gl.MACHINTRUC);
gl.getError(); // gl.INVALID_ENUM;
-</pre>
-
-<h2 id="Spécifications">Spécifications</h2>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th scope="col">Spécification</th>
- <th scope="col">Statut</th>
- <th scope="col">Commentaire</th>
- </tr>
- <tr>
- <td>{{SpecName('WebGL', "#5.14.3", "getError")}}</td>
- <td>{{Spec2('WebGL')}}</td>
- <td>Définition initiale.</td>
- </tr>
- <tr>
- <td>{{SpecName('OpenGL ES 2.0', "glGetError.xml", "glGetError")}}</td>
- <td>{{Spec2('OpenGL ES 2.0')}}</td>
- <td>Page man de l'API OpenGL.</td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2>
-
-<p>{{Compat("api.WebGLRenderingContext.getError")}}</p>
-
-<h2 id="Voir_aussi">Voir aussi</h2>
-
-<ul>
- <li>{{domxref("WebGLRenderingContext")}}</li>
- <li>{{domxref("WebGLContextEvent")}}</li>
-</ul>
+```
+
+## Spécifications
+
+| Spécification | Statut | Commentaire |
+| -------------------------------------------------------------------------------- | ------------------------------------ | ------------------------- |
+| {{SpecName('WebGL', "#5.14.3", "getError")}} | {{Spec2('WebGL')}} | Définition initiale. |
+| {{SpecName('OpenGL ES 2.0', "glGetError.xml", "glGetError")}} | {{Spec2('OpenGL ES 2.0')}} | Page man de l'API OpenGL. |
+
+## Compatibilité des navigateurs
+
+{{Compat("api.WebGLRenderingContext.getError")}}
+
+## Voir aussi
+
+- {{domxref("WebGLRenderingContext")}}
+- {{domxref("WebGLContextEvent")}}