You don't need to inherit from a custom base controller class in order to have all controllers handle exceptions the same way. You can do it with an ActionFilter.
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method,
AllowMultiple = true, Inherited = true)]
public class CustomHandleErrorAttribute : HandleErrorAttribute
{
public override void OnException(ExceptionContext context)
{
// do custom exception handling here
// to return View("Error"), you can just do this:
context.Result = new ViewResult { ViewName = "Error" };
}
}
You can apply this to all of the controllers in your library with this Global.asax:
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
//filters.Add(new HandleErrorAttribute()); // default MVC setting
filters.Add(new CustomHandleErrorAttribute());
}