diff --git a/spec.emu b/spec.emu
index 494d2c5..83e39a8 100644
--- a/spec.emu
+++ b/spec.emu
@@ -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. Perform ? InstallErrorCode(_O_, _options_).
+ 1. Perform ? InstallErrorCause(_O_, _options_).
+ 1. Perform ? InstallErrorOwnProperties(_O_, _options_).
1. Return _O_.
@@ -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. Perform ? InstallErrorCode(_O_, _options_).
+ 1. Perform ? InstallErrorCause(_O_, _options_).
+ 1. Perform ? InstallErrorOwnProperties(_O_, _options_).
1. Return _O_.
@@ -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. Perform ? InstallErrorCode(_O_, _options_).
+ 1. Perform ? InstallErrorCause(_O_, _options_).
+ 1. Perform ? InstallErrorOwnProperties(_O_, _options_).
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_.
@@ -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. Perform ? InstallErrorCode(_O_, _options_).
+ 1. Perform ? InstallErrorCause(_O_, _options_).
+ 1. Perform ? InstallErrorOwnProperties(_O_, _options_).
1. Perform CreateNonEnumerableDataPropertyOrThrow(_O_, *"error"*, _error_).
1. Perform CreateNonEnumerableDataPropertyOrThrow(_O_, *"suppressed"*, _suppressed_).
1. Return _O_.
@@ -107,21 +107,25 @@ contributors: James M Snell
Abstract Operations for Error Objects
-
+
- InstallErrorCode (
+ InstallErrorOwnProperties (
_O_: an Object,
_options_: an ECMAScript language value,
): either a normal completion containing ~unused~ or a throw completion
- 1. If _options_ is an Object and ? HasProperty(_options_, *"code"*) is *true*, then
- 1. Let _code_ be ? Get(_options_, *"code"*).
- 1. Perform CreateNonEnumerableDataPropertyOrThrow(_O_, *"code"*, _code_).
+ 1. If _options_ is an Object, then
+ 1. If ? HasProperty(_options_, *"cause"*) is *true*, then
+ 1. Let _cause_ be ? Get(_options_, *"cause"*).
+ 1. Perform CreateNonEnumerableDataPropertyOrThrow(_O_, *"cause"*, _cause_).
+ 1. If ? HasProperty(_options_, *"code"*) is *true*, then
+ 1. Let _code_ be ? Get(_options_, *"code"*).
+ 1. Perform CreateNonEnumerableDataPropertyOrThrow(_O_, *"code"*, _code_).
1. Return ~unused~.