- const values = [];
- for (const arg of msg.args())
- values.push(await arg.jsonValue());
- console.log(...values);
+ try {
+ const values = [];
+ for (const arg of msg.args())
+ values.push(await arg.jsonValue());
+ console.log(...values);
+ } catch (_) { /* sometimes this gets hit if we're logging while the browser shuts down */ }