/// <summary> /// Internal method for handling errors. /// </summary> /// <param name="error"></param> /// <param name="exception"></param> /// <param name="handler"></param> /// <param name="errorResults"></param> /// <param name="arguments"></param> protected virtual void InternalHandle(object error, Exception exception, IErrors errors, object[] arguments) { string fullError = error == null ? string.Empty : error.ToString(); // Add error to list and log. if (errors != null) { errors.Add(fullError); fullError = errors.Message(); } Logger.Error(fullError, exception, arguments); }
/// <summary> /// Print the errors. /// </summary> /// <param name="errors"></param> private void PrintErrors(IErrors errors) { string combinedErrors = errors.Message(); Console.WriteLine("ERRORS: " + Environment.NewLine + combinedErrors); }