public virtual async Task TrackErrorAsync(Exception ex, Dictionary <string, string> properties)
        {
            try
            {
                if (IsTrackErrorsEnabled)
                {
                    var builder = new HitBuilders.ExceptionBuilder();
                    builder.SetDescription(ex.Message);
                    builder.SetFatal(false);

                    if (properties != null)
                    {
                        foreach (var property in properties)
                        {
                            builder.Set(property.Key, property.Value);
                        }
                    }

                    var exceptionToTrack = builder.Build();

                    Tracker.Send(exceptionToTrack);
                }
            }
            catch (Exception)
            {
            }
        }
        void TrackError(string errorText, bool isFatal)
        {
            if (Debugger.IsAttached)
            {
                Debugger.Break(); // break here so we know an error has occurred while debugging
            }
            try
            {
                Debug.WriteLine($"{nameof(TrackError)}({errorText})");

                HitBuilders.ExceptionBuilder builder = new HitBuilders.ExceptionBuilder();
                builder.SetDescription(errorText);
                builder.SetFatal(isFatal);

                GATracker.Send(builder.Build());
            }
            catch (Exception ex)
            {
                if (Debugger.IsAttached)
                {
                    Debugger.Break();
                }

                Debug.WriteLine(ex);
            }
        }
Esempio n. 3
0
 public void Track_App_Exception(String ExceptionMessageToTrack, Boolean isFatalException)
 {
     HitBuilders.ExceptionBuilder builder = new HitBuilders.ExceptionBuilder();
     builder.SetDescription(ExceptionMessageToTrack);
     builder.SetFatal(isFatalException);
     GATracker.Send(builder.Build());
 }
Esempio n. 4
0
        public void RastrearErros(string mensagemErro, bool erroFatal)
        {
            HitBuilders.ExceptionBuilder builder = new HitBuilders.ExceptionBuilder();
            builder.SetDescription(mensagemErro);
            builder.SetFatal(erroFatal);

            GATracker.Send(builder.Build());
        }
        public void TrackException(string exception, bool isFatal)
        {
            var builder = new HitBuilders.ExceptionBuilder();
            builder.SetDescription(exception);
            builder.SetFatal(isFatal);

            _tracker.Send(builder.Build());
        }
        public void Track_App_Exception(String ExceptionMessageToTrack, Boolean isFatalException)
        {
            HitBuilders.ExceptionBuilder builder = new HitBuilders.ExceptionBuilder();
            builder.SetDescription(ExceptionMessageToTrack);
            builder.SetFatal(isFatalException);

            GATracker.Send(builder.Build());
        }
Esempio n. 7
0
        public void SendException(string exceptionInfo, bool isFatalException)
        {
            HitBuilders.ExceptionBuilder builder = new HitBuilders.ExceptionBuilder();
            builder.SetDescription(exceptionInfo);
            builder.SetFatal(isFatalException);

            _defaultTracker.Send(builder.Build());
        }
        public void TrackAppException(string exceptionMessage, bool isFatalException)
        {
            HitBuilders.ExceptionBuilder builder = new HitBuilders.ExceptionBuilder();
            builder.SetDescription(exceptionMessage);
            builder.SetFatal(isFatalException);

            GATracker.Send(builder.Build());
        }
Esempio n. 9
0
        public void TrackException(string message, bool fatal)
        {
            var builder = new HitBuilders.ExceptionBuilder();

            builder.SetDescription(message);
            builder.SetFatal(fatal);

            _tracker.Send(builder.Build());
        }
        public void TrackException(string msg, bool isFatal)
        {
            var builder = new HitBuilders.ExceptionBuilder();

            builder.SetDescription(msg);
            builder.SetFatal(isFatal);

            Tracker.Send(builder.Build());
        }
        public void LogException(string className, string methodName, Exception e, bool isFatal = false)
        {
            var exceptionBuilder = new HitBuilders.ExceptionBuilder();

            exceptionBuilder.SetDescription(className + ":" + methodName + ": " + e.Message);
            exceptionBuilder.SetFatal(isFatal);

            Trackers.ForEach(x => x.Send(exceptionBuilder.Build()));
        }
Esempio n. 12
0
        internal static void TrackException(string ExceptionMessageToTrack, bool isFatalException)
        {
#if !DEBUG
            HitBuilders.ExceptionBuilder builder = new HitBuilders.ExceptionBuilder();
            builder.SetDescription(ExceptionMessageToTrack);
            builder.SetFatal(isFatalException);

            GATracker.Send(builder.Build());
#endif
        }
Esempio n. 13
0
        public static void TrackAppException(String activity, String method, string exceptionName, string message, Boolean isFatalException)
        {
            var builder = new HitBuilders.ExceptionBuilder();
            var exceptionMessageToTrack = string.Format("{0}, Method : {1}\nException Name : {2}\nMessage : \n{3}", activity, method,
                exceptionName, message);
            builder.SetDescription(exceptionMessageToTrack);
            builder.SetFatal(isFatalException);

            Rep.Instance.GaTracker.Send(builder.Build());
        }
Esempio n. 14
0
        public static void TrackAppException(String activity, String method, string exceptionName, string message, Boolean isFatalException)
        {
            var builder = new HitBuilders.ExceptionBuilder();
            var exceptionMessageToTrack = string.Format("{0}, Method : {1}\nException Name : {2}\nMessage : \n{3}", activity, method,
                                                        exceptionName, message);

            builder.SetDescription(exceptionMessageToTrack);
            builder.SetFatal(isFatalException);

            Rep.Instance.GaTracker.Send(builder.Build());
        }
Esempio n. 15
0
        public static void TrackAppException(string activity, String method, Exception exception, Boolean isFatalException)
        {
            var builder = new HitBuilders.ExceptionBuilder();
            var exceptionMessageToTrack = string.Format("{0}, Method : {1}\nException type : {2}, Exception Message : {3}\nStack Trace : \n{4}", activity, method,
                                                        exception.GetType(), exception.Message, exception.StackTrace);

            builder.SetDescription(exceptionMessageToTrack);
            builder.SetFatal(isFatalException);

            Rep.Instance.GaTracker.Send(builder.Build());
        }
Esempio n. 16
0
        public static void TrackAppException(string activity, String method, Exception exception, Boolean isFatalException)
        {
            var builder = new HitBuilders.ExceptionBuilder();
            var exceptionMessageToTrack = string.Format("{0}, Method : {1}\nException type : {2}, Exception Message : {3}\nStack Trace : \n{4}", activity, method,
                exception.GetType(),exception.Message, exception.StackTrace);

            builder.SetDescription(exceptionMessageToTrack);
            builder.SetFatal(isFatalException);

            Rep.Instance.GaTracker.Send(builder.Build());
        }
Esempio n. 17
0
        public void TrackException(Exception ex, bool isFatal)
        {
            if (Verbosity != VerbosityLevel.AnalyticsOff)
            {
                var builder = new HitBuilders.ExceptionBuilder();

                SetUserIDDimension(builder);

                builder.SetDescription(ParseException(ex));
                builder.SetFatal(isFatal);

                GATracker.Send(builder.Build());
            }
        }
Esempio n. 18
0
        static void TrackUnhandledException(Exception ex)
        {
            var builder_ex = new HitBuilders.ExceptionBuilder();

            var errorMessage = CrossAnalytics.Current.ParseException(ex);

            SetUserIDDimension(builder_ex);

            builder_ex.SetDescription(errorMessage);
            builder_ex.SetFatal(true);
            GATracker.Send(builder_ex.Build());

            var builder_ev = new HitBuilders.EventBuilder();

            SetUserIDDimension(builder_ev);

            builder_ev.SetCategory("Crashes");
            builder_ev.SetAction(errorMessage);
            builder_ev.SetLabel(ex.ToString());
            GATracker.Send(builder_ev.Build());
        }
 public void TrackException(Exception exception, IDictionary <string, string> properties = null)
 {
     HitBuilders.ExceptionBuilder exceptionBuilder = new HitBuilders.ExceptionBuilder();
     exceptionBuilder.SetDescription(this.ConvertParametersToString(properties) + " || " + this.ConvertExceptionToString(exception));
     GoogleMobileAnalyticsProvider.GATracker.Send(((HitBuilders.HitBuilder)exceptionBuilder).Build());
 }