public ErrorViewModel GetErrorViewModel(RouteData data, Exception exception, bool ajax = false) { Ensure.That(() => data).IsNotNull(); string controllerName = data.GetControllerString(Error.EmptyController); string actionName = data.GetActionString(Error.EmptyAction); string errorMessage = GetMessage(exception, ajax); ErrorViewModel model = new ErrorViewModel(context, exception, controllerName, actionName, errorMessage); return model; }
public ErrorViewModel GetErrorViewModel(RouteData data, Exception exception, bool ajax = false) { if (data == null) { throw new ArgumentNullException("data"); } string controllerName = data.GetControllerString(Error.EmptyController); string actionName = data.GetActionString(Error.EmptyAction); string errorMessage = GetMessage(exception, ajax); ErrorViewModel model = new ErrorViewModel(context, exception, controllerName, actionName, errorMessage); return model; }