mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-14 11:51:47 +00:00
Handle uncaught errors
This commit is contained in:
7
index.js
7
index.js
@ -3,6 +3,7 @@ const path = require("path");
|
||||
|
||||
const electron = require("electron");
|
||||
const is = require("electron-is");
|
||||
const unhandled = require("electron-unhandled");
|
||||
const { autoUpdater } = require("electron-updater");
|
||||
|
||||
const config = require("./config");
|
||||
@ -11,6 +12,12 @@ const { fileExists, injectCSS } = require("./plugins/utils");
|
||||
const { isTesting } = require("./utils/testing");
|
||||
const { setUpTray } = require("./tray");
|
||||
|
||||
// Catch errors and log them
|
||||
unhandled({
|
||||
logger: console.error,
|
||||
showDialog: false,
|
||||
});
|
||||
|
||||
const app = electron.app;
|
||||
app.commandLine.appendSwitch(
|
||||
"js-flags",
|
||||
|
||||
Reference in New Issue
Block a user