Skip to content

Commit

Permalink
Fix missing steps and fields in "report an error" in log module. (#838)
Browse files Browse the repository at this point in the history
Missing steps common to the regular console events:

- Creating the `timestamp` field.
- Creating `body` from `entry`.

Also, the `stack` value was created in its own step, but was not
listed in the list of fields creating the specific
`log.JavascriptLogEntry` production.
  • Loading branch information
lauromoura authored Jan 8, 2025
1 parent ea72dc7 commit 0a9eed7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -10992,15 +10992,20 @@ ignore>line number</var>, <var ignore>column number</var>, |message| and

1. Let |settings| be |script|'s [=script/settings object=].

1. Let |timestamp| be a [=time value=] representing the current date and time in UTC.

1. Let |stack| be the [=stack trace for an exception=] with the exception
corresponding to the error being reported.

1. Let |source| be the result of [=get the source=] given [=current Realm Record=].

1. Let |entry| be a [=/map=] matching the <code>log.JavascriptLogEntry</code> production,
with <code>level</code> set to "<code>error</code>", <code>text</code> set to
|message|, <code>source</code> set to |source|, and the <code>timestamp</code>
field set to |timestamp|.
|message|, <code>source</code> set to |source|, <code>timestamp</code>
set to |timestamp|, and the <code>stackTrace</code> field set to |stack|.

1. Let |body| be a [=/map=] matching the <code>log.EntryAdded</code> production, with
the <code>params</code> field set to |entry|.

1. Let |related navigables| be the result of [=get related navigables=] given |settings|.

Expand Down

0 comments on commit 0a9eed7

Please sign in to comment.