From 3e1d0b2fee12dec277051332446d3c1a64fc1ef5 Mon Sep 17 00:00:00 2001 From: hesham Date: Wed, 23 Jan 2019 12:32:12 +0300 Subject: [PATCH] Ex and API --- OWTrack/Tracker.cs | 7 +++---- OWTrack/saveManeger.cs | 11 +++++------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/OWTrack/Tracker.cs b/OWTrack/Tracker.cs index 54f18ab..3882d02 100644 --- a/OWTrack/Tracker.cs +++ b/OWTrack/Tracker.cs @@ -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; diff --git a/OWTrack/saveManeger.cs b/OWTrack/saveManeger.cs index 6367287..9ec54b9 100644 --- a/OWTrack/saveManeger.cs +++ b/OWTrack/saveManeger.cs @@ -29,17 +29,16 @@ namespace OWTrack /// /// Deserialize saved tracker instance. /// - /// + /// Tracker Object public static Tracker GetSavedTracker() { try { return JsonConvert.DeserializeObject(File.ReadAllText(Paths.GetSaves())); } - catch (Exception) + catch (Exception e) { - Exception ex = new Exception("json"); - throw ex; + throw e; } } @@ -61,10 +60,10 @@ namespace OWTrack } /// - ///Saves the Tracker Object. + /// Deserializes and Saves the Tracker Object. /// /// - /// + /// Boolean value that represents the success or failuer public static bool SaveJSON(Tracker tracker) { try