/// <summary>
 /// Initializes a new instance of the <see cref="ExceptionDetail"/> class from the exception
 /// </summary>
 /// <param name="exception">The exception to be serialized as an <see cref="ExceptionDetail"/> object.  </param>
 public ExceptionDetail(Exception exception)
 {
     if (exception == null) throw new ArgumentNullException("exception");
     Type = exception.GetType().ToString();
     if (exception.InnerException != null)
     {
         InnerException = new ExceptionDetail(exception.InnerException);
     }
     StackTrace = exception.StackTrace;
     Message = exception.Message;
 }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ExceptionDetail"/> class from the exception
 /// </summary>
 /// <param name="exception">The exception to be serialized as an <see cref="ExceptionDetail"/> object.  </param>
 public ExceptionDetail(Exception exception)
 {
     if (exception == null)
     {
         throw new ArgumentNullException("exception");
     }
     Type = exception.GetType().ToString();
     if (exception.InnerException != null)
     {
         InnerException = new ExceptionDetail(exception.InnerException);
     }
     StackTrace = exception.StackTrace;
     Message    = exception.Message;
 }