/// <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); }
/// <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); } }