You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>The initial value of `Error.prototype.name` is *"Error"*.</p>
31898
31898
</emu-clause>
31899
31899
31900
+
<emu-clause id="sec-get-error.prototype-stack">
31901
+
<h1>Error.prototype.stack</h1>
31902
+
<p>`Error.prototype.stack` is an accessor property with attributes { [[Enumerable]]: *false*, [[Configurable]]: *true* }. The [[Get]] and [[Set]] attributes are defined as follows:</p>
31903
+
31904
+
<emu-clause id="sec-get-error.prototype.stack">
31905
+
<h1>get Error.prototype.stack</h1>
31906
+
<p>The value of the [[Get]] attribute is a built-in function that requires no arguments. It performs the following steps when called:</p>
31907
+
<emu-alg>
31908
+
1. Let _error_ be the *this* value.
31909
+
1. If _error_ is not an Object, throw a *TypeError* exception.
31910
+
1. If _error_ does not have an [[ErrorData]] internal slot, return *undefined*.
31911
+
1. Return an implementation-defined string that represents the stack trace of _error_.
31912
+
</emu-alg>
31913
+
</emu-clause>
31914
+
31915
+
<emu-clause id="sec-set-error.prototype.stack">
31916
+
<h1>set Error.prototype.stack</h1>
31917
+
<p>The value of the [[Set]] attribute is a built-in function that takes an argument _value_. It performs the following steps when called:</p>
31918
+
<emu-alg>
31919
+
1. Let _error_ be the *this* value.
31920
+
1. If _error_ is not an Object, throw a *TypeError* exception.
31921
+
1. If _value_ is not a String, throw a *TypeError* exception.
<p>Error instances are ordinary objects that inherit properties from the Error prototype object and have an [[ErrorData]] internal slot whose value is *undefined*. The only specified use of [[ErrorData]] is to identify Error, AggregateError, and _NativeError_ instances as Error objects within `Object.prototype.toString` and `Error.isError`.</p>
31947
+
<p>Error instances are ordinary objects that inherit properties from the Error prototype object and have an [[ErrorData]] internal slot whose value is *undefined*. Specified uses of [[ErrorData]] include to identify <emu-xref href="#sec-error-constructor">Error</emu-xref>, <emu-xref href="#sec-aggregate-error-constructor">AggregateError</emu-xref>, and _NativeError_ instances as Error objects within <emu-xref href="#sec-object.prototype.tostring">Object.prototype.toString</emu-xref> and <emu-xref href="#sec-error.iserror">Error.isError</emu-xref>; as well as for the <emu-xref href="#sec-get-error.prototype-stack">Error.prototype.stack accessor</emu-xref>.</p>
<p>_NativeError_ instances are ordinary objects that inherit properties from their _NativeError_ prototype object and have an [[ErrorData]] internal slot whose value is *undefined*. The only specified use of [[ErrorData]] is by `Object.prototype.toString` (<emu-xref href="#sec-object.prototype.tostring"></emu-xref>) and `Error.isError` (<emu-xref href="#sec-error.iserror"></emu-xref>) to identify Error, AggregateError, or _NativeError_ instances.</p>
32063
+
<p>_NativeError_ instances are ordinary objects that inherit properties from their _NativeError_ prototype object and have an [[ErrorData]] internal slot whose value is *undefined*. Specified uses of [[ErrorData]] include to identify <emu-xref href="#sec-error-constructor">Error</emu-xref>, <emu-xref href="#sec-aggregate-error-constructor">AggregateError</emu-xref>, and _NativeError_ instances as Error objects within <emu-xref href="#sec-object.prototype.tostring">Object.prototype.toString</emu-xref> and <emu-xref href="#sec-error.iserror">Error.isError</emu-xref>; as well as for the <emu-xref href="#sec-get-error.prototype-stack">Error.prototype.stack accessor</emu-xref>.</p>
<p>AggregateError instances are ordinary objects that inherit properties from their AggregateError prototype object and have an [[ErrorData]] internal slot whose value is *undefined*. The only specified use of [[ErrorData]] is by `Object.prototype.toString` (<emu-xref href="#sec-object.prototype.tostring"></emu-xref>) and `Error.isError` (<emu-xref href="#sec-error.iserror"></emu-xref>) to identify Error, AggregateError, or _NativeError_ instances.</p>
32140
+
<p>AggregateError instances are ordinary objects that inherit properties from their AggregateError prototype object and have an [[ErrorData]] internal slot whose value is *undefined*. Specified uses of [[ErrorData]] include to identify <emu-xref href="#sec-error-constructor">Error</emu-xref>, <emu-xref href="#sec-aggregate-error-constructor">AggregateError</emu-xref>, and _NativeError_ instances as Error objects within <emu-xref href="#sec-object.prototype.tostring">Object.prototype.toString</emu-xref> and <emu-xref href="#sec-error.iserror">Error.isError</emu-xref>; as well as for the <emu-xref href="#sec-get-error.prototype-stack">Error.prototype.stack accessor</emu-xref>.</p>
0 commit comments