Inheritance: System.Web.Mvc.HandleErrorInfo
        public static string GenerateErrorMessages(ErrorContext errorContext)
        {
            string errorHtml = string.Empty;

            if(errorContext.HasMessages)
            {
                errorHtml = errorContext.ErrorMessage;
            }

            return errorHtml;
        }
Beispiel #2
0
        private static ErrorContext CreateContext(ControllerContext context, Exception ex, IEnumerable<string> additionalMessages, ModelStateDictionary modelState)
        {
            var actionName = context.RouteData.Values["controller"].ToString();
            var controllerName = context.RouteData.Values["action"].ToString();

            var errorContext = new ErrorContext(ex, controllerName, actionName, additionalMessages, modelState);

            return errorContext;
        }