/// <summary> /// Nicely format an error we want to present to the user. /// </summary> private static void PrintUserError(CommandLineApplication app, ErrorMessageException errorMessage) { app.Error.WriteLine(errorMessage.Message); foreach (var line in errorMessage.Data.Keys) { var value = errorMessage.Data[line]?.ToString(); if (string.IsNullOrEmpty(value)) { continue; } app.Error.WriteLine(line.ToString()); app.Error.WriteLine(" " + value); } }
internal static void OnThrowErrorMessageException(ErrorMessageException e) { Assert.Fail(e.Code + ": " + e.Message); }