Skip to content

Commit

Permalink
improve exception tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
Epix37 committed Oct 29, 2015
1 parent b47f0aa commit 861b0de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Hearthstone Deck Tracker/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ private void App_DispatcherUnhandledException(object sender, DispatcherUnhandled
}
}

Analytics.Analytics.TrackEvent("UnhandledException", e.Exception.GetType().ToString().Split('.').Last(), e.Exception.TargetSite.ToString());
var stackTrace = e.Exception.StackTrace.Split(new[] {Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries);
Analytics.Analytics.TrackEvent(e.Exception.GetType().ToString().Split('.').Last(), stackTrace.Length > 0 ? stackTrace[0] : "", stackTrace.Length > 1 ? stackTrace[1] : "");
#if (!DEBUG)
var date = DateTime.Now;
var fileName = "Crash Reports\\"
Expand Down

0 comments on commit 861b0de

Please sign in to comment.