From 89c2cd21082f77c0c0c6a15778cc030142ab4bba Mon Sep 17 00:00:00 2001 From: sadan <117494111+sadan4@users.noreply.github.com> Date: Thu, 6 Jun 2024 22:04:22 -0400 Subject: [PATCH] fix error handling --- src/plugins/customFolderIcons/index.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/customFolderIcons/index.tsx b/src/plugins/customFolderIcons/index.tsx index a162b0479..63220df20 100644 --- a/src/plugins/customFolderIcons/index.tsx +++ b/src/plugins/customFolderIcons/index.tsx @@ -4,6 +4,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ +import { showNotification } from "@api/Notifications"; import { DataStore } from "@api/index"; import { Devs } from "@utils/constants"; import { closeModal, ModalContent, ModalHeader, ModalRoot, openModalLazy } from "@utils/modal"; @@ -164,5 +165,9 @@ function makeContextItem(a: folderProp) { ); } function handleUpdateError(e: any) { - throw e; + showNotification({ + title: "CustomFolderIcons: Error", + body: "An error has occurred. Check the console for more info." + }); + console.error(e); }