From 4be3db8007d6fed81cb7f77c369f456035ef5a7e Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Wed, 3 Jul 2024 18:03:11 -0300 Subject: [PATCH] feat: add error logs --- src/main/events/user-preferences/auto-launch.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/events/user-preferences/auto-launch.ts b/src/main/events/user-preferences/auto-launch.ts index fc05fb62..1f4f9cc3 100644 --- a/src/main/events/user-preferences/auto-launch.ts +++ b/src/main/events/user-preferences/auto-launch.ts @@ -3,6 +3,7 @@ import AutoLaunch from "auto-launch"; import { app } from "electron"; import path from "path"; import fs from "node:fs"; +import { logger } from "@main/services"; const windowsStartupPath = path.join( app.getPath("appData"), @@ -24,13 +25,17 @@ const autoLaunch = async ( }); if (enabled) { - appLauncher.enable().catch(() => {}); + appLauncher.enable().catch((err) => { + logger.error(err); + }); } else { if (process.platform == "win32") { fs.rm(path.join(windowsStartupPath, "Hydra.vbs"), () => {}); } - appLauncher.disable().catch(() => {}); + appLauncher.disable().catch((err) => { + logger.error(err); + }); } };