public Task HandleException(IWebHandler handler, WebBasePage page, Exception ex) { TkDebug.AssertArgument(ex is ErrorPageException, "ex", string.Format(ObjectUtil.SysCulture, "此Handler只处理ErrorPageException,当前的Exception类型为{0}", ex.GetType()), this); ErrorPageSource source = new ErrorPageSource((ErrorPageException)ex); return(InternalWebUtil.WritePage(null, source, fPageMaker, handler)); }
public Task HandleException(IWebHandler handler, WebBasePage page, Exception ex) { string type = page == null?handler.GetType().ToString() : page.GetType().ToString(); ExceptionSource source = new ExceptionSource(handler.SourceInfo.Source, type, handler.PageUrl.ToString(), ex); if (LogException || handler.IsPost) { string fileName = ExceptionUtil.LogException(source.Data); source.FileName = fileName; } return(InternalWebUtil.WritePage(null, source, fPageMaker, handler)); }
protected static void HandleException(ISource source, IPageMaker pageMaker, IWebHandler handler) { InternalWebUtil.WritePage(null, source, pageMaker, handler); }