Source

main-vinayFork / Source / WebClient / Web.Client / Controllers / ErrorController.cs

Full commit
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using DataUp.Web.Client.Properties;

namespace DataUp.Web.Client.Controllers
{
    public class ErrorController : Controller
    {
        /// <summary>
        /// Action handling the general error messages.
        /// </summary>
        /// <returns>General view</returns>
        public ActionResult General(string errorMessage)
        {
            if (string.IsNullOrWhiteSpace(errorMessage))
            {
                errorMessage = Resources.GeneralErrorMessage;
            }

            // There is another overloaded constructor for View, which takes string as parameter and considers that as view name.
            // To pass string value for Model, need to use the parameter type as OBJECT only.
            return View(errorMessage);
        }

    }
}