From 507c51ab63204fae2479051e8841d0e0191c42ec Mon Sep 17 00:00:00 2001 From: Lauro Moura Date: Fri, 20 Dec 2024 15:55:41 -0300 Subject: [PATCH] Fix missing steps and fields in "report an error" in log module. 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. --- index.bs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index 87f5fa9f..fd1d63c4 100644 --- a/index.bs +++ b/index.bs @@ -10988,6 +10988,8 @@ ignore>line number, column number, |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. @@ -10995,8 +10997,11 @@ ignore>line number, column number, |message| and 1. Let |entry| be a [=/map=] matching the log.JavascriptLogEntry production, with level set to "error", text set to - |message|, source set to |source|, and the timestamp - field set to |timestamp|. + |message|, source set to |source|, timestamp + set to |timestamp|, and the stackTrace field set to |stack|. + +1. Let |body| be a [=/map=] matching the log.EntryAdded production, with + the params field set to |entry|. 1. Let |related navigables| be the result of [=get related navigables=] given |settings|.