示例#1
0
 private Dictionary <string, object> DeserializePropertiers(string properties)
 {
     try
     {
         return(JsonUtils.DeserializeProperties(properties));
     }
     catch (Exception ex)
     {
         BugsnagClient.Notify(ex);
     }
     return(new Dictionary <string, object>());
 }
        private void HandleUnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            if (!client.AutoNotify)
            {
                return;
            }

            if (e.IsTerminating)
            {
                // At this point in time we don't want to attempt an HTTP connection, thus we only store
                // the event to disk and hope that the user opens the application again to send the
                // errors to Bugsnag.
                client.Notifier.StoreOnly = true;
            }

            var ex = e.ExceptionObject as Exception;

            if (ex == null)
            {
                ex = new Exception(String.Format("Non-exception: {0}", e.ExceptionObject));
            }
            client.Notify(ex, e.IsTerminating ? ErrorSeverity.Fatal : ErrorSeverity.Error);
        }