Beispiel #1
0
 /// <summary>
 /// Creates an instance of the object.
 /// </summary>
 /// <param name="ex">
 /// The Exception to encapusulate.
 /// </param>
 public WcfErrorInfo(Exception ex)
 {
   this.ExceptionTypeName = ex.GetType().FullName;
   this.Message = ex.Message;
   this.StackTrace = ex.StackTrace;
   this.Source = ex.Source;
   if (ex.TargetSite != null)
     this.TargetSiteName = ex.TargetSite.Name;
   if (ex.InnerException != null)
     this.InnerError = new WcfErrorInfo(ex.InnerException);
 }
Beispiel #2
0
 /// <summary>
 /// Creates an instance of the object.
 /// </summary>
 /// <param name="ex">
 /// The Exception to encapusulate.
 /// </param>
 public WcfErrorInfo(Exception ex)
 {
     this.ExceptionTypeName = ex.GetType().FullName;
     this.Message           = ex.Message;
     this.StackTrace        = ex.StackTrace;
     this.Source            = ex.Source;
     if (ex.TargetSite != null)
     {
         this.TargetSiteName = ex.TargetSite.Name;
     }
     if (ex.InnerException != null)
     {
         this.InnerError = new WcfErrorInfo(ex.InnerException);
     }
 }