Closed Bug 1548480 Opened 5 years ago Closed 7 months ago

Implement all attributes of ExceptionDetails

Categories

(Remote Protocol :: CDP, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: ochameau, Unassigned)

References

()

Details

Bug 1543099 is going to implement a very minimal version of ExceptionDetails.
Only the text attribute:
https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-ExceptionDetails
As that's the one required attribute by current puppeteer implementation:
https://github.com/GoogleChrome/puppeteer/blob/854b1c09126800eca86e7ac42e0ab8f16076e32e/lib/helper.js#L48-L60
It will then benefit from having exception and strackTrace attributes in order to print better error messages.

For Runtime.callFunctionOn I get the following response in Chrome:

  {
    result: {
      type: 'object',
      subtype: 'error',
      className: 'SyntaxError',
      description: "SyntaxError: Unexpected token ':'",
      objectId: '{"injectedScriptId":1,"id":3}'
    },
    exceptionDetails: {
      exceptionId: 2,
      text: 'Uncaught',
      lineNumber: 0,
      columnNumber: 13,
      scriptId: '38',
      exception: {
        type: 'object',
        subtype: 'error',
        className: 'SyntaxError',
        description: "SyntaxError: Unexpected token ':'",
        objectId: '{"injectedScriptId":1,"id":4}'
      }
    }
  },

With Firefox it's just:

  { exceptionDetails: { text: "unexpected token: ':'" } },
Component: CDP: Runtime → CDP
Severity: normal → S3

WebDriver BiDi already implements the log.entryAdded event with all the details. It's not something we are going to implement for CDP.

Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.