We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 94a469a + a281425 commit 2652490Copy full SHA for 2652490
1 file changed
lib/gather-telemetry.js
@@ -7,6 +7,10 @@ module.exports = async function gatherTelemetry(url) {
7
8
await page.goto(url);
9
10
+ await page.exposeFunction("logErrorInNodeProcess", message => {
11
+ console.error(message); // eslint-disable-line no-console
12
+ });
13
+
14
// Get the "viewport" of the page, as reported by the page.
15
const telemetry = await page.evaluate(() => {
16
const SKIPPED_MODULES = ["fetch/ajax"];
@@ -31,7 +35,9 @@ module.exports = async function gatherTelemetry(url) {
31
35
}
32
36
} catch (error) {
33
37
// log the error, but continue
34
- console.error(`error evaluating \`${modulePath}\`: ${error.message}`); // eslint-disable-line no-console
38
+ window.logErrorInNodeProcess(
39
+ `error evaluating \`${modulePath}\`: ${error.message}`
40
+ );
41
42
43
0 commit comments