fix error handling

This commit is contained in:
sadan 2024-06-06 22:04:22 -04:00
parent ffaca84aa5
commit 89c2cd2108
No known key found for this signature in database

View file

@ -4,6 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later * SPDX-License-Identifier: GPL-3.0-or-later
*/ */
import { showNotification } from "@api/Notifications";
import { DataStore } from "@api/index"; import { DataStore } from "@api/index";
import { Devs } from "@utils/constants"; import { Devs } from "@utils/constants";
import { closeModal, ModalContent, ModalHeader, ModalRoot, openModalLazy } from "@utils/modal"; import { closeModal, ModalContent, ModalHeader, ModalRoot, openModalLazy } from "@utils/modal";
@ -164,5 +165,9 @@ function makeContextItem(a: folderProp) {
); );
} }
function handleUpdateError(e: any) { function handleUpdateError(e: any) {
throw e; showNotification({
title: "CustomFolderIcons: Error",
body: "An error has occurred. Check the console for more info."
});
console.error(e);
} }