mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix(page): Don't report clientside error with a node stack attached (#2572)
This patch stops reporting node.js stacks as part of `pageerror` event.
This commit is contained in:
parent
17bc6515de
commit
6a0627a411
@ -461,7 +461,9 @@ class Page extends EventEmitter {
|
|||||||
*/
|
*/
|
||||||
_handleException(exceptionDetails) {
|
_handleException(exceptionDetails) {
|
||||||
const message = helper.getExceptionMessage(exceptionDetails);
|
const message = helper.getExceptionMessage(exceptionDetails);
|
||||||
this.emit(Page.Events.PageError, new Error(message));
|
const err = new Error(message);
|
||||||
|
err.stack = ''; // Don't report clientside error with a node stack attached
|
||||||
|
this.emit(Page.Events.PageError, err);
|
||||||
}
|
}
|
||||||
|
|
||||||
async _onConsoleAPI(event) {
|
async _onConsoleAPI(event) {
|
||||||
|
Loading…
Reference in New Issue
Block a user