Open Bug 1548480 Opened 6 years ago Updated 2 years ago

Implement all attributes of ExceptionDetails

Categories

(Remote Protocol :: CDP, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: ochameau, Unassigned)

References

(Blocks 3 open bugs, )

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
You need to log in before you can comment on or make changes to this bug.