public void OnException(ExceptionContext filterContext) { var context = new ContextImplement(sessionData: false); if (filterContext == null) { throw new ArgumentNullException("No ExceptionContext"); } try { new SysLogModel( context: context, method: nameof(OnException), message: filterContext.Exception.Message, errStackTrace: filterContext.Exception.StackTrace, sysLogType: SysLogModel.SysLogTypes.Execption); var siteId = CanManageSiteId(context: context); SessionUtilities.Set( context: context, key: "ExceptionSiteId", value: siteId.ToString()); } catch { } filterContext.ExceptionHandled = true; filterContext.Result = new RedirectResult( Locations.ApplicationError(context: context)); }
public void OnException(ExceptionContext filterContext) { if (filterContext == null) { throw new ArgumentNullException("No ExceptionContext"); } try { new SysLogModel(filterContext); } catch { throw; } filterContext.ExceptionHandled = true; filterContext.Result = new RedirectResult(Locations.ApplicationError()); }
public void OnException(ExceptionContext filterContext) { var context = new ContextImplement(sessionData: false); if (filterContext == null) { throw new ArgumentNullException("No ExceptionContext"); } try { new SysLogModel( context: context, e: filterContext.Exception); } catch { throw; } filterContext.ExceptionHandled = true; filterContext.Result = new RedirectResult( Locations.ApplicationError(context: context)); }