public void SetErrorInstruction(string message, NotificationErrorType notificationErrorType) { IStandardStreamWriter errorWriter = _console.Error; switch (notificationErrorType) { case NotificationErrorType.Error: Environment.ExitCode = CLIConsts.ExistErrorCode; _console.ForegroundColor = ConsoleColor.DarkRed; break; case NotificationErrorType.Attention: _console.ForegroundColor = ConsoleColor.DarkBlue; break; case NotificationErrorType.None: default: throw new Exception($"Invalid NotificationErrorType '{notificationErrorType}'"); } errorWriter.WriteLine(message); _console.ForegroundColor = ConsoleColor.White; }
public NotificationProcessException(string errorCode, string message, string instructionsMessage, NotificationErrorType notificationErrorType, Exception ex) : base(message, ex) { ErrorCode = errorCode; InstructionsMessage = instructionsMessage; NotificationErrorType = notificationErrorType; }
public NotificationProcessException(string errorCode, string message, string instructionsMessage, NotificationErrorType notificationErrorType) : this(errorCode, message, instructionsMessage, notificationErrorType, null) { }
public NotificationProcessException(string message) : this(message, null) { NotificationErrorType = NotificationErrorType.Error; }
public NotificationError(string message, NotificationErrorType type = NotificationErrorType.UNKNOWN) { Message = message; Type = type; }
internal void StepError(string errorCode, string errorMessage, string instructionsMessage, NotificationErrorType notificationErrorType) { CurrentStepNotificationState.ErrorCode = errorCode; CurrentStepNotificationState.ErrorMesage = errorMessage; CurrentStepNotificationState.InstructionsMessage = instructionsMessage; CurrentStepNotificationState.NotificationErrorType = notificationErrorType; SaveNotificationStateSnapshot(); }
public void SetErrorInstruction(string message, NotificationErrorType notificationErrorType) { _consoleProcessMessages.SetErrorInstruction(message, notificationErrorType); }