When you first create your ASP.NET MVC 3 application, it
won't include any error handling information at all, aside from a very simple
shared view called Error.cshtml (assuming you're using the Razor view engine).
That page is static and simply tells the user, "Sorry, an error occurred
while processing your request." If you create a new controller action and
throw an exception (see Listing 1), and then hit that controller action in your
browser, you may be surprised to see that the error view is not rendered.
Listing 1 - Throwing an Exception in an Action
public ActionResult CreateErrorOne()
{
throw new Exception("No attributes.");
}
The result is a Yellow Screen of Death (YSOD):