From 95aca4b4d8fa62815d4bd412fff1a364f842814a Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Thu, 29 Apr 2021 16:16:42 -0700 Subject: remove retired locales (#699) --- .../ca/web/javascript/reference/errors/index.html | 31 --------- .../reference/errors/read-only/index.html | 79 ---------------------- 2 files changed, 110 deletions(-) delete mode 100644 files/ca/web/javascript/reference/errors/index.html delete mode 100644 files/ca/web/javascript/reference/errors/read-only/index.html (limited to 'files/ca/web/javascript/reference/errors') diff --git a/files/ca/web/javascript/reference/errors/index.html b/files/ca/web/javascript/reference/errors/index.html deleted file mode 100644 index c295fccea6..0000000000 --- a/files/ca/web/javascript/reference/errors/index.html +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: JavaScript error reference -slug: Web/JavaScript/Reference/Errors -tags: - - Debugging - - Error - - Errors - - Exception - - JavaScript - - NeedsTranslation - - TopicStub - - exceptions -translation_of: Web/JavaScript/Reference/Errors ---- -

{{jsSidebar("Errors")}}

- -

Below, you'll find a list of errors which are thrown by JavaScript. These errors can be a helpful debugging aid, but the reported problem isn't always immediately clear. The pages below will provide additional details about these errors. Each error is an object based upon the {{jsxref("Error")}} object, and has a name and a message.

- -

Errors displayed in the Web console may include a link to the corresponding page below to help you quickly comprehend the problem in your code.

- -

List of errors

- -

In this list, each page is listed by name (the type of error) and message (a more detailed human-readable error message). Together, these two properties provide a starting point toward understanding and resolving the error. For more information, follow the links below!

- -

{{ListSubPages("/en-US/docs/Web/JavaScript/Reference/Errors")}}

- -

See also

- - diff --git a/files/ca/web/javascript/reference/errors/read-only/index.html b/files/ca/web/javascript/reference/errors/read-only/index.html deleted file mode 100644 index ac7a574b86..0000000000 --- a/files/ca/web/javascript/reference/errors/read-only/index.html +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: 'TipusError: "x" es només de lectura' -slug: Web/JavaScript/Reference/Errors/Read-only -tags: - - Errors - - JavaScript - - TypeError -translation_of: Web/JavaScript/Reference/Errors/Read-only -original_slug: Web/JavaScript/Reference/Errors/Nomes-Lectura ---- -
{{jsSidebar("Errors")}}
- -

Missatge

- -
TipusError: "x" es només de lectura (Firefox)
-TipusError: 0 es només de lectura (Firefox)
-TipusError: No es pot fer l'assignació a la propietat 'x' de #<Object> que es només de lectura (Chrome)
-TipusError: No es pot fer l'assignació a la propietat '0' de [object Array] (Chrome)
-
- -

Tipus d'error

- -

{{jsxref("TypeError")}}

- -

Qué ha anat malament?

- -

La variable global o propietat de l'objecte a la qual s'ha volgut fer l'assignació es només de lectura. (Tècnicament, es una propietat de no-escriptura.)

- -

Aquest error succeeix només en codi en mode estricte. En codi en mode no estricte, l'assignació es ignorada de manera silenciosa.

- -

Exemples

- -

Casos invàlids

- -

Propietats de només lectura no son súper comuns, però es poden donar quan es fa servir {{jsxref("Object.defineProperty()")}} o {{jsxref("Object.freeze()")}}.

- -
'use strict';
-var obj = Object.freeze({name: 'Elsa', score: 157});
-obj.score = 0;  // TypeError
-
-'use strict';
-Object.defineProperty(this, 'LUNG_COUNT', {value: 2, writable: false});
-LUNG_COUNT = 3;  // TypeError
-
-'use strict';
-var frozenArray = Object.freeze([0, 1, 2]);
-frozenArray[0]++;  // TypeError
-
- -

També hi ha unes poques propietats de només lectura en la construcció de JavaScript. Potser que hagis provat de redefinir una constant matemàtica.

- -
'use strict';
-Math.PI = 4;  // TypeError
- -

Ho sentim, no pots fer això.

- -

La variable global undefined també es només de lectura, llavors no pots silenciar l'infame error "undefined no es una funció" fent això:

- -
'use strict';
-undefined = function() {};  // TypeError: "undefined" es només de lectura
-
- -

Valid cases

- -
'use strict';
-var obj = Object.freeze({name: 'Score', points: 157});
-obj = {name: obj.name, points: 0};   // reemplaçant-ho amb un nou objecte funciona
-
-'use strict';
-var LUNG_COUNT = 2;  // Una `var` funciona, perque no es de només lectura
-LUNG_COUNT = 3;  // ok (anatòmicament potser, però poc probable)
-
- -

See also

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