aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/javascript/reference/global_objects/internalerror
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:52 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:52 -0500
commit074785cea106179cb3305637055ab0a009ca74f2 (patch)
treee6ae371cccd642aa2b67f39752a2cdf1fd4eb040 /files/pt-br/web/javascript/reference/global_objects/internalerror
parentda78a9e329e272dedb2400b79a3bdeebff387d47 (diff)
downloadtranslated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.gz
translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.bz2
translated-content-074785cea106179cb3305637055ab0a009ca74f2.zip
initial commit
Diffstat (limited to 'files/pt-br/web/javascript/reference/global_objects/internalerror')
-rw-r--r--files/pt-br/web/javascript/reference/global_objects/internalerror/index.html92
1 files changed, 92 insertions, 0 deletions
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
+---
+<div>{{JSRef}} {{non-standard_header}}</div>
+
+<p>O <strong>objeto</strong> <strong><code>InternalError</code> </strong>indica que um erro ocorreu internamente na engine do JavaScript.</p>
+
+<p>Isso ocorre quando algo é muito grande, por exemplo:</p>
+
+<ul>
+ <li>"too many switch cases",</li>
+ <li>"too many parentheses in regular expression",</li>
+ <li>"array initializer too large",</li>
+ <li>"too much recursion".</li>
+</ul>
+
+<h2 id="Construtor">Construtor</h2>
+
+<dl>
+ <dt><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError/InternalError"><code>InternalError()</code></a></dt>
+ <dd>Cria um um novo objeto <code>InternalError</code>.</dd>
+</dl>
+
+<h2 id="Instance_properties">Instance properties</h2>
+
+<dl>
+ <dt>{{jsxref("Error.prototype.message", "InternalError.prototype.message")}}</dt>
+ <dd>Error message. Inherited from {{jsxref("Error")}}.</dd>
+ <dt>{{jsxref("Error.prototype.name", "InternalError.prototype.name")}}</dt>
+ <dd>Error name. Inherited from {{jsxref("Error")}}.</dd>
+ <dt>{{jsxref("Error.prototype.fileName", "InternalError.prototype.fileName")}}</dt>
+ <dd>Path to file that raised this error. Inherited from {{jsxref("Error")}}.</dd>
+ <dt>{{jsxref("Error.prototype.lineNumber", "InternalError.prototype.lineNumber")}}</dt>
+ <dd>Line number in file that raised this error. Inherited from {{jsxref("Error")}}.</dd>
+ <dt>{{jsxref("Error.prototype.columnNumber", "InternalError.prototype.columnNumber")}}</dt>
+ <dd>Column number in line that raised this error. Inherited from {{jsxref("Error")}}.</dd>
+ <dt>{{jsxref("Error.prototype.stack", "InternalError.prototype.stack")}}</dt>
+ <dd>Stack trace. Inherited from {{jsxref("Error")}}.</dd>
+</dl>
+
+<h2 id="Examples">Examples</h2>
+
+<h3 id="Too_much_recursion">Too much recursion</h3>
+
+<p>This recursive function runs 10 times, as per the exit condition.</p>
+
+<pre class="brush: js notranslate">function loop(x) {
+ if (x &gt;= 10) // "x &gt;= 10" is the exit condition
+ return;
+ // do stuff
+ loop(x + 1); // the recursive call
+}
+loop(0);</pre>
+
+<p>Setting this condition to an extremely high value, won't work:</p>
+
+<pre class="brush: js example-bad notranslate">function loop(x) {
+ if (x &gt;= 1000000000000)
+ return;
+ // do stuff
+ loop(x + 1);
+}
+loop(0);
+
+// InternalError: too much recursion</pre>
+
+<p>For more information, see <a href="/en-US/docs/Web/JavaScript/Reference/Errors/Too_much_recursion">InternalError: too much recursion.</a></p>
+
+<h2 id="Specifications">Specifications</h2>
+
+<p><span class="pl-s">Not part of any standard.</span></p>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+<div>
+<div>
+
+
+<p>{{Compat("javascript.builtins.InternalError")}}</p>
+</div>
+</div>
+
+<h2 id="See_also">See also</h2>
+
+<ul>
+ <li>{{jsxref("Error")}}</li>
+ <li>
+ <p><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Too_much_recursion">InternalError: too much recursion</a></p>
+ </li>
+</ul>