added proper error message

This commit is contained in:
Miodec 2022-04-08 22:26:21 +02:00
parent 83114dfcd7
commit 851ae1adc5

View file

@ -278,6 +278,13 @@ export async function screenshot(): Promise<void> {
.then(() => {
Notifications.add("Copied to clipboard", 1, 2);
revertScreenshot();
})
.catch((e: any) => {
Notifications.add(
"Error saving image to clipboard: " + e.message,
-1
);
revertScreenshot();
});
}
} catch (e: any) {