public ExceptionPart(Exception E, int Depth = 0) { E = E ?? new Exception(); StackTrace = E.StackTrace ?? ""; MethodName = E.TargetSite?.Name ?? ""; ModuleName = E.TargetSite?.Module?.Name ?? ""; Message = E.Message ?? ""; HResult = E.HResult; HResultHex = string.Format("0x{0}", HResult.ToString("X8")); if (Depth < 5 && E.InnerException != null) { Exception = new ExceptionPart(E.InnerException, Depth + 1); } }
public ErrorEntry(Exception E, TemplateRequest Request) : this() { this.Request = Request; Exception = new ExceptionPart(E); }