v8/test/inspector/runtime/get-exception-details-expected.txt
Simon Zünd 17536f94d6 [inspector] Report exceptionMetaData for Runtime#getExceptionDetails
The ExceptionDetails structure allows the association of requests and
issues with JavaScript errors. These are currently only reported
when an exception goes through `Runtime#exceptionThrown`, but we
also want the metadata available when the ExceptionDetails are
requested explicitly for any Error object.

R=bmeurer@chromium.org

Bug: chromium:1280141
Change-Id: I1b1514207b9e146fda3452c3f7991cd7dc9a387b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3477098
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79199}
2022-02-22 07:53:13 +00:00

113 lines
3.1 KiB
Plaintext

Tests that Runtime.getExceptionDetails works
Running test: itShouldReturnExceptionDetailsForJSErrorObjects
{
id : <messageId>
result : {
exceptionDetails : {
columnNumber : 9
exception : {
className : Error
description : Error: error 1 at foo (<anonymous>:3:10) at <anonymous>:5:1
objectId : <objectId>
subtype : error
type : object
}
exceptionId : <exceptionId>
lineNumber : 2
scriptId : <scriptId>
stackTrace : {
callFrames : [
[0] : {
columnNumber : 9
functionName : foo
lineNumber : 2
scriptId : <scriptId>
url :
}
[1] : {
columnNumber : 0
functionName :
lineNumber : 4
scriptId : <scriptId>
url :
}
]
}
text : Error: error 1
}
}
}
Running test: itShouldReturnIncompleteDetailsForJSErrorWithNoStack
{
id : <messageId>
result : {
exceptionDetails : {
columnNumber : -1
exception : {
className : Error
description : Error: error 1 at foo (<anonymous>:3:10) at <anonymous>:5:1
objectId : <objectId>
subtype : error
type : object
}
exceptionId : <exceptionId>
lineNumber : -1
scriptId : <scriptId>
text : Error: error 1
}
}
}
Running test: itShouldReportAnErrorForNonJSErrorObjects
{
error : {
code : -32000
message : errorObjectId is not a JS error object
}
id : <messageId>
}
Running test: itShouldIncludeMetaData
{
id : <messageId>
result : {
exceptionDetails : {
columnNumber : 9
exception : {
className : Error
description : Error: myerror at foo (<anonymous>:3:10) at <anonymous>:5:1
objectId : <objectId>
subtype : error
type : object
}
exceptionId : <exceptionId>
exceptionMetaData : {
foo : bar
}
lineNumber : 2
scriptId : <scriptId>
stackTrace : {
callFrames : [
[0] : {
columnNumber : 9
functionName : foo
lineNumber : 2
scriptId : <scriptId>
url :
}
[1] : {
columnNumber : 0
functionName :
lineNumber : 4
scriptId : <scriptId>
url :
}
]
}
text : Error: myerror
}
}
}