summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWither OrNot2025-04-04 01:02:50 +0000
committerWither OrNot2025-04-04 01:02:50 +0000
commitaa0801c643729177454fc329f092456afb86f3ab (patch)
treeee7f162044005240a2ae62e3c95ab48a859ea38a
parent736c722880ef33cc2072f5ff28e6d051fed0c782 (diff)
downloadTSforge-aa0801c643729177454fc329f092456afb86f3ab.zip
fix error handling
-rw-r--r--LibTSforge/SPP/SPPUtils.cs9
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))