From cef2f5cd6b2b40abac94de71a4809e38e066671a Mon Sep 17 00:00:00 2001 From: SARDONYX-sard <68905624+SARDONYX-sard@users.noreply.github.com> Date: Thu, 19 Sep 2024 13:32:14 +0900 Subject: [PATCH] feat(front): change log catch any --- .vscode/settings.json | 2 +- gui/frontend/src/components/buttons/log_btn.tsx | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 4353b8c..631dd9c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -19,7 +19,7 @@ }, "evenBetterToml.formatter.alignComments": true, // "rust-analyzer.checkOnSave": false, - // "editor.formatOnSave": false + // "editor.formatOnSave": false, "files.exclude": { ".swc": true, "**/node_modules": true // optional diff --git a/gui/frontend/src/components/buttons/log_btn.tsx b/gui/frontend/src/components/buttons/log_btn.tsx index 1218a87..1a0327b 100644 --- a/gui/frontend/src/components/buttons/log_btn.tsx +++ b/gui/frontend/src/components/buttons/log_btn.tsx @@ -38,9 +38,7 @@ export const LogFileButton = () => { try { await openLogFile(); } catch (error) { - if (error instanceof Error) { - notify.error(error.message); - } + notify.error(`${error}`); } }; @@ -54,9 +52,7 @@ export const LogDirButton = () => { try { await openLogDir(); } catch (error) { - if (error instanceof Error) { - notify.error(error.message); - } + notify.error(`${error}`); } };