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); .FirstOrDefault(p => p.MainModule.FileName.StartsWith(settings.GamePath)) != default(Process);
return isRunning; return isRunning;
} }
catch (Exception) catch (Exception e)
{ {
Exception ex = new Exception("Error"); throw e;
throw ex;
} }
} }
else return false; else return false;

View File

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