/// <summary> /// Tracks an exception /// </summary> /// <param name="ApplicationException"> /// The exception object to be tracked /// </param> public void TrackException(Exception ApplicationException) { lock (ObjectLock) { if (Started && ApplicationException != null) { CheckApplicationCorrectness(); var json = new ExceptionJson(ApplicationException, GetFlowNumber()); JSON.Add(JsonBuilder.GetJsonFromHashTable(json.GetJsonHashTable())); } } }
/// <summary> /// Tracks an exception /// </summary> /// <param name="exception"> /// The exception object to be tracked /// </param> public void TrackException(Exception exception) { if (exception == null) throw new ArgumentNullException("exception"); lock (_objectLock) { if (Started) { CheckIfEnabled(); var json = new ExceptionJson(_sessionGUID, exception, GetFlowNumber()); _json.Add(JsonBuilder.GetJsonFromHashTable(json.GetJsonHashTable())); } } }