Ejemplo n.º 1
0
 public void OnMessageDeleted(ErrorEventData eventData)
 {
     //Step 14: Callback for when a message is deleted
     Debug.Log(displayName + " OnMessageDeleted");
     if (eventData.IsError)
     {
         Debug.LogError(eventData.Exception.Message);
     }
 }
Ejemplo n.º 2
0
        private static void ReportErrorInternal(
            ErrorEventData error,
            LocationData?location = null,
            bool logFailure       = false)
        {
            if (!m_enabled)
            {
                return;
            }

            var json = CreateWriter();

            error.Write(json);
            if (location.HasValue)
            {
                location.Value.Write(json);
            }
            Report("error", json, logFailure);
        }
Ejemplo n.º 3
0
 public static void ReportError(SeverityEnum severityEnum, string messageText, bool async = true)
 {
     if (AnalyticsEnabled)
     {
         var data = new ErrorEventData()
         {
             severity = severityEnum,
             message  = string.IsNullOrWhiteSpace(messageText) ? "No text specified." : messageText,
         };
         if (async)
         {
             Parallel.Start(() => { ReportErrorInternal(data); });
         }
         else
         {
             ReportErrorInternal(data);
         }
     }
 }
Ejemplo n.º 4
0
 public static void ReportError(SeverityEnum severityEnum, Exception ex, bool async = true)
 {
     if (AnalyticsEnabled)
     {
         var data = new ErrorEventData()
         {
             severity = severityEnum,
             message  = (ex == null) ? "No exception specified." : ex.ToString(),
         };
         if (async)
         {
             Parallel.Start(() => { ReportErrorInternal(data); });
         }
         else
         {
             ReportErrorInternal(data);
         }
     }
 }
Ejemplo n.º 5
0
 public static void ReportError(SeverityEnum severityEnum, string messageText, bool async = true)
 {
     if (!MyCompilationSymbols.RenderOrGpuProfiling)
     {
         var data = new ErrorEventData()
         {
             severity = severityEnum,
             message  = string.IsNullOrWhiteSpace(messageText) ? "No text specified." : messageText,
         };
         if (async)
         {
             Parallel.Start(() => { ReportErrorInternal(data); });
         }
         else
         {
             ReportErrorInternal(data);
         }
     }
 }
Ejemplo n.º 6
0
 public static void ReportError(SeverityEnum severityEnum, Exception ex, bool async = true)
 {
     if (!MyCompilationSymbols.RenderOrGpuProfiling)
     {
         var data = new ErrorEventData()
         {
             severity = severityEnum,
             message  = (ex == null) ? "No exception specified." : ex.ToString(),
         };
         if (async)
         {
             Parallel.Start(() => { ReportErrorInternal(data); });
         }
         else
         {
             ReportErrorInternal(data);
         }
     }
 }
Ejemplo n.º 7
0
        private static void ReportErrorInternal(
            ErrorEventData error,
            LocationData? location = null,
            bool logFailure = false)
        {
            if (!m_enabled)
                return;

            var json = CreateWriter();
            error.Write(json);
            if (location.HasValue)
                location.Value.Write(json);
            Report("error", json, logFailure);
        }
Ejemplo n.º 8
0
 public static void ReportError(SeverityEnum severityEnum, string messageText, bool async = true)
 {
     if (AnalyticsEnabled)
     {
         var data = new ErrorEventData()
         {
             severity = severityEnum,
             message = string.IsNullOrWhiteSpace(messageText) ? "No text specified." : messageText,
         };
         if (async)
             Parallel.Start(() => { ReportErrorInternal(data); });
         else
             ReportErrorInternal(data);
     }
 }
Ejemplo n.º 9
0
 public static void ReportError(SeverityEnum severityEnum, Exception ex, bool async = true)
 {
     if (AnalyticsEnabled)
     {
         var data = new ErrorEventData()
         {
             severity = severityEnum,
             message = (ex == null) ? "No exception specified." : ex.ToString(),
         };
         if (async)
             Parallel.Start(() => { ReportErrorInternal(data); });
         else
             ReportErrorInternal(data);
     }
 }
 public static void ReportError(SeverityEnum severityEnum, string messageText, bool async = true)
 {
     if (!MyCompilationSymbols.RenderOrGpuProfiling)
     {
         var data = new ErrorEventData()
         {
             severity = severityEnum,
             message = string.IsNullOrWhiteSpace(messageText) ? "No text specified." : messageText,
         };
         if (async)
             Parallel.Start(() => { ReportErrorInternal(data); });
         else
             ReportErrorInternal(data);
     }
 }
 public static void ReportError(SeverityEnum severityEnum, Exception ex, bool async = true)
 {
     if (!MyCompilationSymbols.RenderOrGpuProfiling)
     {
         var data = new ErrorEventData()
         {
             severity = severityEnum,
             message = (ex == null) ? "No exception specified." : ex.ToString(),
         };
         if (async)
             Parallel.Start(() => { ReportErrorInternal(data); });
         else
             ReportErrorInternal(data);
     }
 }