diff --git a/spec.html b/spec.html index 50d5cfa..18ccc7c 100644 --- a/spec.html +++ b/spec.html @@ -305,6 +305,82 @@

Runtime Semantics: Evaluation

+ +

Fundamental Objects

+ + +

Error Objects

+ + +

The Error Constructor

+ + +

Error ( _message_ [ , _options_ ] )

+

This function performs the following steps when called:

+ + 1. If NewTarget is *undefined*, let _newTarget_ be the active function object; else let _newTarget_ be NewTarget. + 1. Let _O_ be ? OrdinaryCreateFromConstructor(_newTarget_, *"%Error.prototype%"*, « [[ErrorData]] »). + 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 CreateNonEnumerableDataPropertyOrThrow(_O_, *"snapshot"*, ? CreateAsyncContextSnapshotObject(AsyncContextSnapshot())). + 1. Return _O_. + +
+
+ + +

_NativeError_ Object Structure

+ + +

The _NativeError_ Constructors

+ + +

_NativeError_ ( _message_ [ , _options_ ] )

+

Each _NativeError_ function performs the following steps when called:

+ + 1. If NewTarget is *undefined*, let _newTarget_ be the active function object; else let _newTarget_ be NewTarget. + 1. [id="step-nativeerror-ordinarycreatefromconstructor"] Let _O_ be ? OrdinaryCreateFromConstructor(_newTarget_, "%NativeError.prototype%", « [[ErrorData]] »). + 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 CreateNonEnumerableDataPropertyOrThrow(_O_, *"snapshot"*, ? CreateAsyncContextSnapshotObject(AsyncContextSnapshot())). + 1. Return _O_. + +

The actual value of the string passed in step is either *"%EvalError.prototype%"*, *"%RangeError.prototype%"*, *"%ReferenceError.prototype%"*, *"%SyntaxError.prototype%"*, *"%TypeError.prototype%"*, or *"%URIError.prototype%"* corresponding to which _NativeError_ constructor is being defined.

+
+
+
+ + +

AggregateError Objects

+ + +

The AggregateError Constructor

+ + +

AggregateError ( _errors_, _message_ [ , _options_ ] )

+

This function performs the following steps when called:

+ + 1. If NewTarget is *undefined*, let _newTarget_ be the active function object; else let _newTarget_ be NewTarget. + 1. Let _O_ be ? OrdinaryCreateFromConstructor(_newTarget_, *"%AggregateError.prototype%"*, « [[ErrorData]] »). + 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. Let _errorsList_ be ? IteratorToList(? GetIterator(_errors_, ~sync~)). + 1. Perform ! DefinePropertyOrThrow(_O_, *"errors"*, PropertyDescriptor { [[Configurable]]: *true*, [[Enumerable]]: *false*, [[Writable]]: *true*, [[Value]]: CreateArrayFromList(_errorsList_) }). + 1. Perform CreateNonEnumerableDataPropertyOrThrow(_O_, *"snapshot"*, ? CreateAsyncContextSnapshotObject(AsyncContextSnapshot())). + 1. Return _O_. + +
+
+
+
+
+

Control Abstraction Objects

@@ -816,9 +892,6 @@

1. Set _asyncSnapshot_.[[AsyncSnapshotMapping]] to _snapshotMapping_. 1. Return _asyncSnapshot_. - -

This abstract operation is meant for hosts to use, and it is not used in this specification.

-