From aa0801c643729177454fc329f092456afb86f3ab Mon Sep 17 00:00:00 2001 From: Wither OrNot Date: Thu, 3 Apr 2025 21:02:50 -0400 Subject: [PATCH] fix error handling --- LibTSforge/SPP/SPPUtils.cs | 9 ++++++--- 1 file 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))