From a03ea7f3b3bfae5a2b9d31c79912cdf8cc3e228e Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Sat, 15 Nov 2025 18:23:02 +0900 Subject: [PATCH] Update WelsonJS.Toolkit/WelsonJS.Launcher/Program.cs Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> --- WelsonJS.Toolkit/WelsonJS.Launcher/Program.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/WelsonJS.Toolkit/WelsonJS.Launcher/Program.cs b/WelsonJS.Toolkit/WelsonJS.Launcher/Program.cs index fb6a04b..99de06f 100644 --- a/WelsonJS.Toolkit/WelsonJS.Launcher/Program.cs +++ b/WelsonJS.Toolkit/WelsonJS.Launcher/Program.cs @@ -193,9 +193,18 @@ namespace WelsonJS.Launcher Directory.CreateDirectory(workingDirectory); } - catch + catch (IOException ex) { - throw new Exception("Instance Initialization failed"); + throw new Exception("Instance Initialization failed due to an IO error.", ex); + } + catch (UnauthorizedAccessException ex) + { + throw new Exception("Instance Initialization failed due to insufficient permissions.", ex); + } + catch (InvalidOperationException) + { + // Let InvalidOperationException bubble up as it is thrown intentionally above + throw; } return workingDirectory;