From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- .../global_objects/internalerror/index.html | 92 ++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 files/pt-br/web/javascript/reference/global_objects/internalerror/index.html (limited to 'files/pt-br/web/javascript/reference/global_objects/internalerror') diff --git a/files/pt-br/web/javascript/reference/global_objects/internalerror/index.html b/files/pt-br/web/javascript/reference/global_objects/internalerror/index.html new file mode 100644 index 0000000000..12de103329 --- /dev/null +++ b/files/pt-br/web/javascript/reference/global_objects/internalerror/index.html @@ -0,0 +1,92 @@ +--- +title: InternalError +slug: Web/JavaScript/Reference/Global_Objects/InternalError +translation_of: Web/JavaScript/Reference/Global_Objects/InternalError +--- +
{{JSRef}} {{non-standard_header}}
+ +

O objeto InternalError indica que um erro ocorreu internamente na engine do JavaScript.

+ +

Isso ocorre quando algo é muito grande, por exemplo:

+ + + +

Construtor

+ +
+
InternalError()
+
Cria um um novo objeto InternalError.
+
+ +

Instance properties

+ +
+
{{jsxref("Error.prototype.message", "InternalError.prototype.message")}}
+
Error message. Inherited from {{jsxref("Error")}}.
+
{{jsxref("Error.prototype.name", "InternalError.prototype.name")}}
+
Error name. Inherited from {{jsxref("Error")}}.
+
{{jsxref("Error.prototype.fileName", "InternalError.prototype.fileName")}}
+
Path to file that raised this error. Inherited from {{jsxref("Error")}}.
+
{{jsxref("Error.prototype.lineNumber", "InternalError.prototype.lineNumber")}}
+
Line number in file that raised this error. Inherited from {{jsxref("Error")}}.
+
{{jsxref("Error.prototype.columnNumber", "InternalError.prototype.columnNumber")}}
+
Column number in line that raised this error. Inherited from {{jsxref("Error")}}.
+
{{jsxref("Error.prototype.stack", "InternalError.prototype.stack")}}
+
Stack trace. Inherited from {{jsxref("Error")}}.
+
+ +

Examples

+ +

Too much recursion

+ +

This recursive function runs 10 times, as per the exit condition.

+ +
function loop(x) {
+  if (x >= 10) // "x >= 10" is the exit condition
+    return;
+  // do stuff
+  loop(x + 1); // the recursive call
+}
+loop(0);
+ +

Setting this condition to an extremely high value, won't work:

+ +
function loop(x) {
+  if (x >= 1000000000000)
+    return;
+  // do stuff
+  loop(x + 1);
+}
+loop(0);
+
+// InternalError: too much recursion
+ +

For more information, see InternalError: too much recursion.

+ +

Specifications

+ +

Not part of any standard.

+ +

Browser compatibility

+ +
+
+ + +

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

+
+
+ +

See also

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