#6 Handling Error in MVC-HandleErrorAttribute

By Default if an exception occurs in action method,it bubbles up to the FilterConfig which holds the  HandleError that is responsible for catching the exception.Framework also provides a View named “Error.cshtml” in shared folder that is responsible to show the exceptions in UI.

public static void RegisterGlobalFilters(GlobalFilterCollection filters)
filters.Add(new HandleErrorAttribute());

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s