Ex and API

This commit is contained in:
hesham 2019-01-23 12:32:12 +03:00
parent 0ed3830d9c
commit 3e1d0b2fee
2 changed files with 8 additions and 10 deletions

View File

@ -88,10 +88,9 @@ namespace OWTrack
.FirstOrDefault(p => p.MainModule.FileName.StartsWith(settings.GamePath)) != default(Process);
return isRunning;
}
catch (Exception)
{
Exception ex = new Exception("Error");
throw ex;
catch (Exception e)
{
throw e;
}
}
else return false;

View File

@ -29,17 +29,16 @@ namespace OWTrack
/// <summary>
/// Deserialize saved tracker instance.
/// </summary>
/// <returns></returns>
/// <returns>Tracker Object</returns>
public static Tracker GetSavedTracker()
{
try
{
return JsonConvert.DeserializeObject<Tracker>(File.ReadAllText(Paths.GetSaves()));
}
catch (Exception)
catch (Exception e)
{
Exception ex = new Exception("json");
throw ex;
throw e;
}
}
@ -61,10 +60,10 @@ namespace OWTrack
}
/// <summary>
///Saves the Tracker Object.
/// Deserializes and Saves the Tracker Object.
/// </summary>
/// <param name="tracker"></param>
/// <returns></returns>
/// <returns>Boolean value that represents the success or failuer</returns>
public static bool SaveJSON(Tracker tracker)
{
try