fix error handling

This commit is contained in:
Wither OrNot 2025-04-03 21:02:50 -04:00
parent 736c722880
commit aa0801c643

View File

@ -206,11 +206,14 @@ namespace LibTSforge.SPP
{ {
string psPath; string psPath;
try
{ {
psPath = GetPSPath(version); psPath = GetPSPath(version);
} }
catch
{
throw new FileNotFoundException("Failed to get path of physical store.");
}
if (string.IsNullOrEmpty(psPath) || !File.Exists(psPath)) if (string.IsNullOrEmpty(psPath) || !File.Exists(psPath))
{ {
@ -238,7 +241,7 @@ namespace LibTSforge.SPP
} }
catch 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)) if (string.IsNullOrEmpty(tokPath) || !File.Exists(tokPath))