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,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))