-
Notifications
You must be signed in to change notification settings - Fork 3.1k
HTML integration for "Error Stack Accessor" TC39 Proposal #12239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10386,17 +10386,11 @@ interface <dfn interface>DOMStringList</dfn> { | |
| <span>IsDataDescriptor</span>(<var>valueMessageDesc</var>) is false, and | ||
| ? <span>ToString</span>(<var>valueMessageDesc</var>.[[Value]]) otherwise.</p></li> | ||
|
|
||
| <li><p>Set <var>serialized</var> to { [[Type]]: "Error", [[Name]]: <var>name</var>, | ||
| [[Message]]: <var>message</var> }.</p></li> | ||
|
|
||
| <li> | ||
| <p>User agents should attach a serialized representation of any interesting accompanying | ||
| data which are not yet specified, notably the <code data-x="">stack</code> property, to | ||
| <var>serialized</var>.</p> | ||
| <li><p>Let <var>stack</var> be an <span>implementation-defined</span> string that represents the stack | ||
| trace of <var>value</var>. <ref>JSERRORSTACKACCESSOR</ref> <ref>JSERRORSTACKS</ref></p></li> | ||
|
|
||
| <p class="note">See the <cite>Error Stacks</cite> proposal for in-progress work on specifying | ||
| this data. <ref>JSERRORSTACKS</ref></p> | ||
| </li> | ||
| <li><p>Set <var>serialized</var> to { [[Type]]: "Error", [[Name]]: <var>name</var>, | ||
| [[Message]]: <var>message</var>, [[Stack]]: <var>stack</var> }.</p></li> | ||
| </ol> | ||
| </li> | ||
|
|
||
|
|
@@ -10848,7 +10842,7 @@ o.myself = o;</code></pre> | |
| <li><p>Let <var>message</var> be <var>serialized</var>.[[Message]].</p></li> | ||
|
|
||
| <li><p>Set <var>value</var> to <span>OrdinaryObjectCreate</span>(<var>prototype</var>, « | ||
| [[ErrorData]] »).</p></li> | ||
| [[ErrorData]], [[Stack]] »).</p></li> | ||
|
|
||
| <li><p>Let <var>messageDesc</var> be <span>PropertyDescriptor</span> { [[Value]]: | ||
| <var>message</var>, [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true | ||
|
|
@@ -10858,8 +10852,8 @@ o.myself = o;</code></pre> | |
| <span>OrdinaryDefineOwnProperty</span>(<var>value</var>, "<code data-x="">message</code>", | ||
| <var>messageDesc</var>).</p></li> | ||
|
|
||
| <li><p>Any interesting accompanying data attached to <var>serialized</var> should be | ||
| deserialized and attached to <var>value</var>.</p></li> | ||
| <li><p>Set <var>value</var>.[[Stack]] to an implementation-defined value that represents | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. xref implementation-defined. Although, can it literally be anything? We already serialized it to a string. Can it stay a string or do some implementations deserialize to an Array or Object? It would be nice if only one side had to be implementation-defined and we could at least agree on the value type.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The user-visible value is always a string, but implementations can store any data structure they like there, and they will want to if https://github.com/tc39/proposal-error-stacks advances.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But then let’s just serialize as an implementation-defined string and return that as-is here? Alternatively I suppose we could have implementation-defined on both sides but then we don’t have to require a string when serializing, but do need to require that here. |
||
| the stack trace serialized in <var>serialized</var>.[[Stack]].</p></li> | ||
| </ol> | ||
| </li> | ||
|
|
||
|
|
@@ -156433,8 +156427,11 @@ INSERT INTERFACES HERE | |
| <dt id="refsJPEG">[JPEG]</dt> | ||
| <dd><cite><a href="https://www.w3.org/Graphics/JPEG/jfif3.pdf">JPEG File Interchange Format</a></cite>, E. Hamilton.</dd> | ||
|
|
||
| <dt id="refsJSERRORSTACKACCESSOR">[JSERRORSTACKACCESSOR]</dt> | ||
| <dd><cite><a href="https://tc39.es/proposal-error-stack-accessor/">Error Stack Accessor</a></cite>. Ecma International.</dd> | ||
|
|
||
| <dt id="refsJSERRORSTACKS">[JSERRORSTACKS]</dt> | ||
| <dd>(Non-normative) <cite><a href="https://tc39.es/proposal-error-stacks/">Error Stacks</a></cite>. Ecma International.</dd> | ||
| <dd><cite><a href="https://tc39.es/proposal-error-stacks/">Error Stacks</a></cite>. Ecma International.</dd> | ||
|
|
||
| <dt id="refsJSDYNAMICCODEBRANDCHECKS">[JSDYNAMICCODEBRANDCHECKS]</dt> | ||
| <dd><cite><a href="https://tc39.es/proposal-dynamic-code-brand-checks/">Dynamic code brand checks</a></cite>. Ecma International.</dd> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs rewrapping.