diff options
| author | Wither OrNot | 2025-04-04 01:02:50 +0000 |
|---|---|---|
| committer | Wither OrNot | 2025-04-04 01:02:50 +0000 |
| commit | aa0801c643729177454fc329f092456afb86f3ab (patch) | |
| tree | ee7f162044005240a2ae62e3c95ab48a859ea38a | |
| parent | 736c722880ef33cc2072f5ff28e6d051fed0c782 (diff) | |
| download | TSforge-aa0801c643729177454fc329f092456afb86f3ab.zip | |
fix error handling
| -rw-r--r-- | LibTSforge/SPP/SPPUtils.cs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/LibTSforge/SPP/SPPUtils.cs b/LibTSforge/SPP/SPPUtils.cs index 21db680..a0b3a77 100644 --- a/LibTSforge/SPP/SPPUtils.cs +++ b/LibTSforge/SPP/SPPUtils.cs @@ -206,12 +206,15 @@ namespace LibTSforge.SPP { string psPath; - + try { psPath = GetPSPath(version); + } + catch + { + throw new FileNotFoundException("Failed to get path of physical store."); } - if (string.IsNullOrEmpty(psPath) || !File.Exists(psPath)) { throw new FileNotFoundException(string.Format("Physical store not found at expected path {0}.", psPath)); @@ -238,7 +241,7 @@ namespace LibTSforge.SPP } catch { - throw new FileNotFoundException("Failed to get path of physical store."); + throw new FileNotFoundException("Failed to get path of token store."); } if (string.IsNullOrEmpty(tokPath) || !File.Exists(tokPath)) |
