Update WelsonJS.Toolkit/WelsonJS.Launcher/Program.cs

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
This commit is contained in:
Namhyeon Go 2025-11-15 18:23:02 +09:00 committed by GitHub
parent c677c6907a
commit a03ea7f3b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;