From c4e72a6e47a8d91cd06b294dd7b54b6713767408 Mon Sep 17 00:00:00 2001 From: Agampreet Singh <68941022+agam778@users.noreply.github.com> Date: Mon, 22 Jul 2024 13:39:51 +0530 Subject: [PATCH] Enhanced error handling for AptaBase init and tracking --- app/main.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/main.js b/app/main.js index 3de15e8..95ef9b5 100644 --- a/app/main.js +++ b/app/main.js @@ -27,7 +27,9 @@ transports.file.level = "verbose"; console.log = _log; Object.assign(console, functions); -initialize("A-US-2528580917"); +initialize("A-US-2528580917").catch((error) => { + console.error("Error initializing:", error); +}); function createWindow() { const enterpriseOrNormal = getValue("enterprise-or-normal"); @@ -65,7 +67,9 @@ function createWindow() { win.webContents.on("did-finish-load", () => { splash.destroy(); win.show(); - trackEvent("app_started"); + trackEvent("app_started").catch((error) => { + console.error("Error tracking event:", error); + }); if (getValue("discordrpcstatus") === "true") { setActivity(`On "${win.webContents.getTitle()}"`); }