aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/javascript/reference/global_objects/referenceerror/index.html
diff options
context:
space:
mode:
authorjulieng <julien.gattelier@gmail.com>2021-08-03 08:03:09 +0200
committerSphinxKnight <SphinxKnight@users.noreply.github.com>2021-09-03 08:08:25 +0200
commit844f5103992238c0c23203286dad16a466e89c97 (patch)
treed537708951bb2b61be8192ffacc05a0ce6804f89 /files/fr/web/javascript/reference/global_objects/referenceerror/index.html
parenta70fd5b73ecb10bec3906640023e2a1a46e118a2 (diff)
downloadtranslated-content-844f5103992238c0c23203286dad16a466e89c97.tar.gz
translated-content-844f5103992238c0c23203286dad16a466e89c97.tar.bz2
translated-content-844f5103992238c0c23203286dad16a466e89c97.zip
move *.html to *.md
Diffstat (limited to 'files/fr/web/javascript/reference/global_objects/referenceerror/index.html')
-rw-r--r--files/fr/web/javascript/reference/global_objects/referenceerror/index.html128
1 files changed, 0 insertions, 128 deletions
diff --git a/files/fr/web/javascript/reference/global_objects/referenceerror/index.html b/files/fr/web/javascript/reference/global_objects/referenceerror/index.html
deleted file mode 100644
index 7e9f25a051..0000000000
--- a/files/fr/web/javascript/reference/global_objects/referenceerror/index.html
+++ /dev/null
@@ -1,128 +0,0 @@
----
-title: ReferenceError
-slug: Web/JavaScript/Reference/Global_Objects/ReferenceError
-tags:
- - Error
- - JavaScript
- - Object
- - Reference
- - ReferenceError
-translation_of: Web/JavaScript/Reference/Global_Objects/ReferenceError
-original_slug: Web/JavaScript/Reference/Objets_globaux/ReferenceError
----
-<div>{{JSRef}}</div>
-
-<p>L'objet <code><strong>ReferenceError</strong></code> représente une erreur qui se produit lorsqu'il est fait référence à une variable qui n'existe pas.</p>
-
-<h2 id="Syntaxe">Syntaxe</h2>
-
-<pre class="syntaxbox">new ReferenceError(<var>[message[, nomFichier[, numLigne]]]</var>)</pre>
-
-<h3 id="Paramètres">Paramètres</h3>
-
-<dl>
- <dt><code>message</code></dt>
- <dd>Paramètre optionnel. Une description de l'erreur, lisible par un être humain.</dd>
- <dt><code>nomFichier</code> {{Non-standard_inline}}</dt>
- <dd>Paramètre optionnel. Le nom du fichier qui contient le code à l'origine de l'exception.</dd>
- <dt><code>numLigne</code> {{Non-standard_inline}}</dt>
- <dd>Paramètre optionnel. Le numéro de ligne dans le fichier qui contient le code à l'origine de l'exception.</dd>
-</dl>
-
-<h2 id="Description">Description</h2>
-
-<p>Une exception <code>ReferenceError</code> est lancée quand on tente de faire référence à une variable qui n'a pas été déclarée.</p>
-
-<h2 id="Propriétés">Propriétés</h2>
-
-<dl>
- <dt>{{jsxref("ReferenceError.prototype")}}</dt>
- <dd>Cette propriété permet d'ajouter des propriétés à un objet <code>ReferenceError</code>.</dd>
-</dl>
-
-<h2 id="Méthodes">Méthodes</h2>
-
-<p>L'objet global <code>ReferenceError</code> ne contient aucune méthode qui lui soit propre. En revanche, il hérite de certaines méthodes via l'héritage et sa chaîne de prototypes.</p>
-
-<h2 id="Instances_de_ReferenceError">Instances de <code>ReferenceError</code></h2>
-
-<h3 id="Propriétés_2">Propriétés</h3>
-
-<div>{{page('fr/docs/Web/JavaScript/Reference/Objets_globaux/ReferenceError/prototype','Properties')}}</div>
-
-<h3 id="Méthodes_2">Méthodes</h3>
-
-<div>{{page('fr/docs/Web/JavaScript/Reference/Objets_globaux/ReferenceError/prototype','M.C3.A9thodes')}}</div>
-
-<h2 id="Exemples">Exemples</h2>
-
-<h3 id="Intercepter_une_exception_ReferenceError">Intercepter une exception ReferenceError</h3>
-
-<pre class="brush: js">try {
- var a = variableNonDéfinie;
-} catch (e) {
- console.log(e instanceof ReferenceError); // true
- console.log(e.message); // "variableNonDéfinie is not defined"
- console.log(e.name); // "ReferenceError"
- console.log(e.fileName); // "Scratchpad/1"
- console.log(e.lineNumber); // 2
- console.log(e.columnNumber); // 6
- console.log(e.stack); // "@Scratchpad/2:2:7\n"
-}</pre>
-
-<h3 id="Créer_une_exception_ReferenceError">Créer une exception <code>ReferenceError</code></h3>
-
-<pre class="brush: js">try {
- throw new ReferenceError('Bonjour', 'unFichier.js', 10);
-} catch (e) {
- console.log(e instanceof ReferenceError); // true
- console.log(e.message); // "Bonjour"
- console.log(e.name); // "ReferenceError"
- console.log(e.fileName); // "unFichier.js"
- console.log(e.lineNumber); // 10
- console.log(e.columnNumber); // 0
- console.log(e.stack); // "@Scratchpad/2:2:9\n"
-}</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">Commentaires</th>
- </tr>
- <tr>
- <td>{{SpecName('ES3')}}</td>
- <td>{{Spec2('ES3')}}</td>
- <td>Définition initiale.</td>
- </tr>
- <tr>
- <td>{{SpecName('ES5.1', '#sec-15.11.6.3', 'ReferenceError')}}</td>
- <td>{{Spec2('ES5.1')}}</td>
- <td> </td>
- </tr>
- <tr>
- <td>{{SpecName('ES6', '#sec-native-error-types-used-in-this-standard-referenceerror', 'ReferenceError')}}</td>
- <td>{{Spec2('ES6')}}</td>
- <td> </td>
- </tr>
- <tr>
- <td>{{SpecName('ESDraft', '#sec-native-error-types-used-in-this-standard-referenceerror', 'ReferenceError')}}</td>
- <td>{{Spec2('ESDraft')}}</td>
- <td> </td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2>
-
-<p>{{Compat("javascript.builtins.ReferenceError")}}</p>
-
-<h2 id="Voir_aussi">Voir aussi</h2>
-
-<ul>
- <li>{{jsxref("Error")}}</li>
- <li>{{jsxref("ReferenceError.prototype")}}</li>
-</ul>