Example #1
0
        public RaygunErrorMessage(Exception exception)
        {
            var exceptionType = exception.GetType();

            Message   = string.Format("{0}: {1}", exceptionType.Name, exception.Message);
            ClassName = exceptionType.FullName;

            StackTrace = BuildStackTrace(exception);

            if (exception.Data != null)
            {
                IDictionary data = new Dictionary <object, object>();
                foreach (object key in exception.Data.Keys)
                {
                    if (!RaygunClient.SentKey.Equals(key))
                    {
                        data[key] = exception.Data[key];
                    }
                }
                Data = data;
            }

            if (exception.InnerException != null)
            {
                InnerError = new RaygunErrorMessage(exception.InnerException);
            }
        }
        public static RaygunErrorMessage Build(Exception exception)
        {
            RaygunErrorMessage message = new RaygunErrorMessage();

              var exceptionType = exception.GetType();

              message.Message = exception.Message;
              message.ClassName = FormatTypeName(exceptionType, true);

              message.StackTrace = BuildStackTrace(exception);
              message.Data = exception.Data;

              AggregateException ae = exception as AggregateException;
              if (ae != null && ae.InnerExceptions != null)
              {
            message.InnerErrors = new RaygunErrorMessage[ae.InnerExceptions.Count];
            int index = 0;
            foreach (Exception e in ae.InnerExceptions)
            {
              message.InnerErrors[index] = Build(e);
              index++;
            }
              }
              else if (exception.InnerException != null)
              {
            message.InnerError = Build(exception.InnerException);
              }

              return message;
        }
    public RaygunErrorMessage(Exception exception)
    {
      var exceptionType = exception.GetType();

      Message = string.Format("{0}: {1}", exceptionType.Name, exception.Message);
      ClassName = exceptionType.FullName;

      StackTrace = BuildStackTrace(exception);

      if (exception.Data != null)
      {
        IDictionary data = new Dictionary<object, object>();
        foreach (object key in exception.Data.Keys)
        {
          if (!RaygunClient.SentKey.Equals(key))
          {
            data[key] = exception.Data[key];
          }
        }
        Data = data;
      }

      if (exception.InnerException != null)
      {
        InnerError = new RaygunErrorMessage(exception.InnerException);
      }
    }
        public RaygunErrorMessage(Exception exception)
        {
            var exceptionType = exception.GetType();

            #if IOS
              MonoTouchException mex = exception as MonoTouchException;
              if(mex != null && mex.NSException != null)
              {
            Message = string.Format("{0}: {1}", mex.NSException.Name, mex.NSException.Reason);
            ClassName = mex.NSException.Name;
              }
              else{
            #endif
              Message = string.Format("{0}: {1}", exceptionType.Name, exception.Message);
              ClassName = exceptionType.FullName;
            #if IOS
              }
            #endif

              StackTrace = BuildStackTrace(exception);
              Data = exception.Data;

              if (exception.InnerException != null)
              {
            InnerError = new RaygunErrorMessage(exception.InnerException);
              }
        }
        public RaygunErrorMessage(Exception exception)
        {
            var exceptionType = exception.GetType();

#if IOS
            MonoTouchException mex = exception as MonoTouchException;
            if (mex != null && mex.NSException != null)
            {
                Message   = string.Format("{0}: {1}", mex.NSException.Name, mex.NSException.Reason);
                ClassName = mex.NSException.Name;
            }
            else
            {
#endif
            Message   = string.Format("{0}: {1}", exceptionType.Name, exception.Message);
            ClassName = exceptionType.FullName;
#if IOS
        }
#endif

            StackTrace = BuildStackTrace(exception);
            Data       = exception.Data;

            if (exception.InnerException != null)
            {
                InnerError = new RaygunErrorMessage(exception.InnerException);
            }
        }
        public static RaygunErrorMessage Build(Exception exception)
        {
            RaygunErrorMessage message = new RaygunErrorMessage();

              var exceptionType = exception.GetType();

              message.Message = exception.Message;
              message.ClassName = FormatTypeName(exceptionType, true);

              message.StackTrace = BuildStackTrace(exception);

              if (exception.Data != null)
              {
            IDictionary data = new Dictionary<object, object>();
            foreach (object key in exception.Data.Keys)
            {
              if (!RaygunClientBase.SentKey.Equals(key))
              {
            data[key] = exception.Data[key];
              }
            }
            message.Data = data;
              }

              if (exception.InnerException != null)
              {
            message.InnerError = Build(exception.InnerException);
              }

              return message;
        }
        public RaygunErrorMessage(Exception exception)
        {
            var exceptionType = exception.GetType();

              Message = string.Format("{0}: {1}", exceptionType.Name, exception.Message);
              StackTrace = BuildStackTrace(exception);
              ClassName = exceptionType.FullName;
              Data = exception.Data;

              if (exception.InnerException != null)
              {
            InnerError = new RaygunErrorMessage(exception.InnerException);
              }
        }
Example #8
0
        public RaygunErrorMessage(Exception exception)
        {
            var exceptionType = exception.GetType();

            Message   = string.Format("{0}: {1}", exceptionType.Name, exception.Message);
            ClassName = exceptionType.FullName;

            StackTrace = BuildStackTrace(exception);
            Data       = exception.Data;

            if (exception.InnerException != null)
            {
                InnerError = new RaygunErrorMessage(exception.InnerException);
            }
        }
        public static RaygunErrorMessage Build(Exception exception)
        {
            RaygunErrorMessage message = new RaygunErrorMessage();

              var exceptionType = exception.GetType();

              message.Message = exception.Message;
              message.ClassName = FormatTypeName(exceptionType, true);

              message.StackTrace = BuildStackTrace(exception);
              message.Data = exception.Data;

              if (exception.InnerException != null)
              {
            message.InnerError = Build(exception.InnerException);
              }

              return message;
        }
        public static RaygunErrorMessage Build(Exception exception)
        {
            RaygunErrorMessage message = new RaygunErrorMessage();

              var exceptionType = exception.GetType();

              message.Message = exception.Message;
              message.ClassName = exceptionType.FullName;

              message.StackTrace = BuildStackTrace(exception);

              if (exception.Data != null)
              {
            IDictionary data = new Dictionary<object, object>();
            foreach (object key in exception.Data.Keys)
            {
              if (!RaygunClient.SentKey.Equals(key))
              {
            data[key] = exception.Data[key];
              }
            }
            message.Data = data;
              }

              AggregateException ae = exception as AggregateException;
              if (ae != null && ae.InnerExceptions != null)
              {
            message.InnerErrors = new RaygunErrorMessage[ae.InnerExceptions.Count];
            int index = 0;
            foreach (Exception e in ae.InnerExceptions)
            {
              message.InnerErrors[index] = Build(e);
              index++;
            }
              }
              else if (exception.InnerException != null)
              {
            message.InnerError = Build(exception.InnerException);
              }

              return message;
        }
        public static RaygunErrorMessage Build(Exception exception)
        {
            RaygunErrorMessage message = new RaygunErrorMessage();

              var exceptionType = exception.GetType();

              message.Message = exception.Message;
              message.ClassName = FormatTypeName(exceptionType, true);

              message.StackTrace = BuildStackTrace(exception);

              if (exception.Data != null)
              {
            IDictionary data = new Dictionary<object, object>();
            foreach (object key in exception.Data.Keys)
            {
              if (!RaygunClientBase.SentKey.Equals(key))
              {
            data[key] = exception.Data[key];
              }
            }
            message.Data = data;
              }

              IList<Exception> innerExceptions = GetInnerExceptions(exception);
              if (innerExceptions != null && innerExceptions.Count > 0)
              {
            message.InnerErrors = new RaygunErrorMessage[innerExceptions.Count];
            int index = 0;
            foreach (Exception e in innerExceptions)
            {
              message.InnerErrors[index] = Build(e);
              index++;
            }
              }
              else if (exception.InnerException != null)
              {
            message.InnerError = Build(exception.InnerException);
              }

              return message;
        }
        public RaygunErrorMessage(Exception exception)
        {
            var exceptionType = exception.GetType();

            Message   = string.Format("{0}: {1}", exceptionType.Name, exception.Message);
            ClassName = exceptionType.FullName;

            StackTrace = BuildStackTrace(exception);

            if (exception.Data != null)
            {
                IDictionary data = new Dictionary <object, object>();
                foreach (object key in exception.Data.Keys)
                {
                    if (!RaygunClient.SentKey.Equals(key))
                    {
                        data[key] = exception.Data[key];
                    }
                }
                Data = data;
            }

            AggregateException ae = exception as AggregateException;

            if (ae != null && ae.InnerExceptions != null)
            {
                InnerErrors = new RaygunErrorMessage[ae.InnerExceptions.Count];
                int index = 0;
                foreach (Exception e in ae.InnerExceptions)
                {
                    InnerErrors[index] = new RaygunErrorMessage(e);
                    index++;
                }
            }
            else if (exception.InnerException != null)
            {
                InnerError = new RaygunErrorMessage(exception.InnerException);
            }
        }
    public RaygunErrorMessage(Exception exception)
    {
      var exceptionType = exception.GetType();

      Message = string.Format("{0}: {1}", exceptionType.Name, exception.Message);
      ClassName = exceptionType.FullName;

      StackTrace = BuildStackTrace(exception);

      if (exception.Data != null)
      {
        IDictionary data = new Dictionary<object, object>();
        foreach (object key in exception.Data.Keys)
        {
          if (!RaygunClient.SentKey.Equals(key))
          {
            data[key] = exception.Data[key];
          }
        }
        Data = data;
      }

      AggregateException ae = exception as AggregateException;
      if (ae != null && ae.InnerExceptions != null)
      {
        InnerErrors = new RaygunErrorMessage[ae.InnerExceptions.Count];
        int index = 0;
        foreach (Exception e in ae.InnerExceptions)
        {
          InnerErrors[index] = new RaygunErrorMessage(e);
          index++;
        }
      }
      else if (exception.InnerException != null)
      {
        InnerError = new RaygunErrorMessage(exception.InnerException);
      }
    }