Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 18 additions & 14 deletions spec.emu
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ contributors: James M Snell
1. If _message_ is not *undefined*, then
1. Let _msg_ be ? ToString(_message_).
1. Perform CreateNonEnumerableDataPropertyOrThrow(_O_, *"message"*, _msg_).
1. Perform ? InstallErrorCause(_O_, _options_).
1. <ins>Perform ? InstallErrorCode(_O_, _options_).</ins>
1. <del>Perform ? InstallErrorCause(_O_, _options_).</del>
1. <ins>Perform ? InstallErrorOwnProperties(_O_, _options_).</ins>
1. Return _O_.
</emu-alg>
</emu-clause>
Expand All @@ -46,8 +46,8 @@ contributors: James M Snell
1. If _message_ is not *undefined*, then
1. Let _msg_ be ? ToString(_message_).
1. Perform CreateNonEnumerableDataPropertyOrThrow(_O_, *"message"*, _msg_).
1. Perform ? InstallErrorCause(_O_, _options_).
1. <ins>Perform ? InstallErrorCode(_O_, _options_).</ins>
1. <del>Perform ? InstallErrorCause(_O_, _options_).</del>
1. <ins>Perform ? InstallErrorOwnProperties(_O_, _options_).</ins>
1. Return _O_.
</emu-alg>
</emu-clause>
Expand All @@ -69,8 +69,8 @@ contributors: James M Snell
1. If _message_ is not *undefined*, then
1. Let _msg_ be ? ToString(_message_).
1. Perform CreateNonEnumerableDataPropertyOrThrow(_O_, *"message"*, _msg_).
1. Perform ? InstallErrorCause(_O_, _options_).
1. <ins>Perform ? InstallErrorCode(_O_, _options_).</ins>
1. <del>Perform ? InstallErrorCause(_O_, _options_).</del>
1. <ins>Perform ? InstallErrorOwnProperties(_O_, _options_).</ins>
1. Let _errorsList_ be ? IteratorToList(? GetIterator(_errors_, ~sync~)).
1. Perform ! DefinePropertyOrThrow(_O_, *"errors"*, PropertyDescriptor { [[Configurable]]: *true*, [[Enumerable]]: *false*, [[Writable]]: *true*, [[Value]]: CreateArrayFromList(_errorsList_) }).
1. Return _O_.
Expand All @@ -94,8 +94,8 @@ contributors: James M Snell
1. If _message_ is not *undefined*, then
1. Let _messageString_ be ? ToString(_message_).
1. Perform CreateNonEnumerableDataPropertyOrThrow(_O_, *"message"*, _messageString_).
1. Perform ? InstallErrorCause(_O_, _options_).
1. <ins>Perform ? InstallErrorCode(_O_, _options_).</ins>
1. <del>Perform ? InstallErrorCause(_O_, _options_).</del>
1. <ins>Perform ? InstallErrorOwnProperties(_O_, _options_).</ins>
1. Perform CreateNonEnumerableDataPropertyOrThrow(_O_, *"error"*, _error_).
1. Perform CreateNonEnumerableDataPropertyOrThrow(_O_, *"suppressed"*, _suppressed_).
1. Return _O_.
Expand All @@ -107,21 +107,25 @@ contributors: James M Snell
<emu-clause id="sec-error-objects-abstract-operations">
<h1>Abstract Operations for Error Objects</h1>

<emu-clause id="sec-installerrorcode" type="abstract operation">
<emu-clause id="sec-installerrorownproperties" type="abstract operation">
<h1>
<ins>InstallErrorCode (
<ins>InstallErrorOwnProperties (
_O_: an Object,
_options_: an ECMAScript language value,
): either a normal completion containing ~unused~ or a throw completion</ins>
</h1>
<dl class="header">
<dt>description</dt>
<dd><ins>It is used to create a *"code"* property on _O_ when a *"code"* property is present on _options_.</ins></dd>
<dd><ins>It is used to create *"cause"* and *"code"* properties on _O_ when the corresponding properties are present on _options_.</ins></dd>
</dl>
<emu-alg>
1. <ins>If _options_ is an Object and ? HasProperty(_options_, *"code"*) is *true*, then</ins>
1. <ins>Let _code_ be ? Get(_options_, *"code"*).</ins>
1. <ins>Perform CreateNonEnumerableDataPropertyOrThrow(_O_, *"code"*, _code_).</ins>
1. <ins>If _options_ is an Object, then</ins>
1. <ins>If ? HasProperty(_options_, *"cause"*) is *true*, then</ins>
1. <ins>Let _cause_ be ? Get(_options_, *"cause"*).</ins>
1. <ins>Perform CreateNonEnumerableDataPropertyOrThrow(_O_, *"cause"*, _cause_).</ins>
1. <ins>If ? HasProperty(_options_, *"code"*) is *true*, then</ins>
1. <ins>Let _code_ be ? Get(_options_, *"code"*).</ins>
1. <ins>Perform CreateNonEnumerableDataPropertyOrThrow(_O_, *"code"*, _code_).</ins>
1. <ins>Return ~unused~.</ins>
</emu-alg>
</emu-clause>
Expand Down
Loading