From 844f5103992238c0c23203286dad16a466e89c97 Mon Sep 17 00:00:00 2001 From: julieng Date: Tue, 3 Aug 2021 08:03:09 +0200 Subject: move *.html to *.md --- .../reference/global_objects/urierror/index.html | 134 --------------------- .../reference/global_objects/urierror/index.md | 134 +++++++++++++++++++++ 2 files changed, 134 insertions(+), 134 deletions(-) delete mode 100644 files/fr/web/javascript/reference/global_objects/urierror/index.html create mode 100644 files/fr/web/javascript/reference/global_objects/urierror/index.md (limited to 'files/fr/web/javascript/reference/global_objects/urierror') diff --git a/files/fr/web/javascript/reference/global_objects/urierror/index.html b/files/fr/web/javascript/reference/global_objects/urierror/index.html deleted file mode 100644 index 3b83e72f11..0000000000 --- a/files/fr/web/javascript/reference/global_objects/urierror/index.html +++ /dev/null @@ -1,134 +0,0 @@ ---- -title: URIError -slug: Web/JavaScript/Reference/Global_Objects/URIError -tags: - - Error - - JavaScript - - Object - - Reference - - URIError -translation_of: Web/JavaScript/Reference/Global_Objects/URIError -original_slug: Web/JavaScript/Reference/Objets_globaux/URIError ---- -
{{JSRef}}
- -

L'objet URIError représente une erreur renvoyée lorsqu'une fonction de manipulation d'URI a été utilisée de façon inappropriée.

- -

Syntaxe

- -
new URIError([message[, nomFichier[, numéroLigne]]])
- -

Paramètres

- -
-
message
-
Ce paramètre est optionnel. Il correspond à un chaîne de caractères décrivant l'erreur de façon compréhensible.
-
nomFichier {{non-standard_inline}}
-
Ce paramètre est optionnel. Il correspond au nom du fichier contenant le code à l'origine de l'exception.
-
numéroLigne {{non-standard_inline}}
-
Ce paramètre est optionnel. Il correspond au numéro de la ligne dans le fichier contenant le code qui a entraîné l'exception.
-
- -

Description

- -

Une exception URIError est lancée lorsque les fonctions de gestion d'URI reçoivent une URI mal formée.

- -

Propriétés

- -
-
{{jsxref("URIError.prototype")}}
-
Cette propriété permet d'ajouter des propriétés à un objet URIError.
-
- -

Méthodes

- -

L'objet global URIError ne contient aucune méthode qui lui soit directement attachée. Cependant, il hérite de certaines méthodes grâce à sa chaîne de prototypes.

- -

Instances d'URIError

- -

Propriétés

- -
{{page('/fr/docs/Web/JavaScript/Reference/Objets_globaux/URIError/prototype', 'Propriétés')}}
- -

Méthodes

- -
{{page('/fr/docs/Web/JavaScript/Reference/Objets_globaux/URIError/prototype', 'Méthodes')}}
- -

Exemples

- -

Intercepter une exception URIError

- -
try {
-  decodeURIComponent('%');
-} catch (e) {
-  console.log(e instanceof URIError); // true
-  console.log(e.message);             // "malformed URI sequence"
-  console.log(e.name);                // "URIError"
-  console.log(e.fileName);            // "Scratchpad/1"
-  console.log(e.lineNumber);          // 2
-  console.log(e.columnNumber);        // 2
-  console.log(e.stack);               // "@Scratchpad/2:2:3\n"
-}
-
- -

Créer une exception URIError

- -
try {
-  throw new URIError('Coucou', 'monFichier.js', 10);
-} catch (e) {
-  console.log(e instanceof URIError); // true
-  console.log(e.message);             // "Coucou"
-  console.log(e.name);                // "URIError"
-  console.log(e.fileName);            // "monFichier.js"
-  console.log(e.lineNumber);          // 10
-  console.log(e.columnNumber);        // 0
-  console.log(e.stack);               // "@Scratchpad/2:2:9\n"
-}
-
- -

Spécifications

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SpécificationStatutCommentaires
{{SpecName('ES3', '#sec-15.11.6.6', 'URIError')}}{{Spec2('ES3')}}Définition initiale.
{{SpecName('ES5.1', '#sec-15.11.6.6', 'URIError')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-native-error-types-used-in-this-standard-urierror', 'URIError')}}{{Spec2('ES6')}} 
{{SpecName('ESDraft', '#sec-native-error-types-used-in-this-standard-urierror', 'URIError')}}{{Spec2('ESDraft')}} 
- -

Compatibilité des navigateurs

- -

{{Compat("javascript.builtins.URIError")}}

- -

Voir aussi

- - diff --git a/files/fr/web/javascript/reference/global_objects/urierror/index.md b/files/fr/web/javascript/reference/global_objects/urierror/index.md new file mode 100644 index 0000000000..3b83e72f11 --- /dev/null +++ b/files/fr/web/javascript/reference/global_objects/urierror/index.md @@ -0,0 +1,134 @@ +--- +title: URIError +slug: Web/JavaScript/Reference/Global_Objects/URIError +tags: + - Error + - JavaScript + - Object + - Reference + - URIError +translation_of: Web/JavaScript/Reference/Global_Objects/URIError +original_slug: Web/JavaScript/Reference/Objets_globaux/URIError +--- +
{{JSRef}}
+ +

L'objet URIError représente une erreur renvoyée lorsqu'une fonction de manipulation d'URI a été utilisée de façon inappropriée.

+ +

Syntaxe

+ +
new URIError([message[, nomFichier[, numéroLigne]]])
+ +

Paramètres

+ +
+
message
+
Ce paramètre est optionnel. Il correspond à un chaîne de caractères décrivant l'erreur de façon compréhensible.
+
nomFichier {{non-standard_inline}}
+
Ce paramètre est optionnel. Il correspond au nom du fichier contenant le code à l'origine de l'exception.
+
numéroLigne {{non-standard_inline}}
+
Ce paramètre est optionnel. Il correspond au numéro de la ligne dans le fichier contenant le code qui a entraîné l'exception.
+
+ +

Description

+ +

Une exception URIError est lancée lorsque les fonctions de gestion d'URI reçoivent une URI mal formée.

+ +

Propriétés

+ +
+
{{jsxref("URIError.prototype")}}
+
Cette propriété permet d'ajouter des propriétés à un objet URIError.
+
+ +

Méthodes

+ +

L'objet global URIError ne contient aucune méthode qui lui soit directement attachée. Cependant, il hérite de certaines méthodes grâce à sa chaîne de prototypes.

+ +

Instances d'URIError

+ +

Propriétés

+ +
{{page('/fr/docs/Web/JavaScript/Reference/Objets_globaux/URIError/prototype', 'Propriétés')}}
+ +

Méthodes

+ +
{{page('/fr/docs/Web/JavaScript/Reference/Objets_globaux/URIError/prototype', 'Méthodes')}}
+ +

Exemples

+ +

Intercepter une exception URIError

+ +
try {
+  decodeURIComponent('%');
+} catch (e) {
+  console.log(e instanceof URIError); // true
+  console.log(e.message);             // "malformed URI sequence"
+  console.log(e.name);                // "URIError"
+  console.log(e.fileName);            // "Scratchpad/1"
+  console.log(e.lineNumber);          // 2
+  console.log(e.columnNumber);        // 2
+  console.log(e.stack);               // "@Scratchpad/2:2:3\n"
+}
+
+ +

Créer une exception URIError

+ +
try {
+  throw new URIError('Coucou', 'monFichier.js', 10);
+} catch (e) {
+  console.log(e instanceof URIError); // true
+  console.log(e.message);             // "Coucou"
+  console.log(e.name);                // "URIError"
+  console.log(e.fileName);            // "monFichier.js"
+  console.log(e.lineNumber);          // 10
+  console.log(e.columnNumber);        // 0
+  console.log(e.stack);               // "@Scratchpad/2:2:9\n"
+}
+
+ +

Spécifications

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SpécificationStatutCommentaires
{{SpecName('ES3', '#sec-15.11.6.6', 'URIError')}}{{Spec2('ES3')}}Définition initiale.
{{SpecName('ES5.1', '#sec-15.11.6.6', 'URIError')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-native-error-types-used-in-this-standard-urierror', 'URIError')}}{{Spec2('ES6')}} 
{{SpecName('ESDraft', '#sec-native-error-types-used-in-this-standard-urierror', 'URIError')}}{{Spec2('ESDraft')}} 
+ +

Compatibilité des navigateurs

+ +

{{Compat("javascript.builtins.URIError")}}

+ +

Voir aussi

+ + -- cgit v1.2.3-54-g00ecf