private void failIf(bool condition, string message, CommandExceptionType type) { if (condition) { throw new CommandException(message, type); } }
/// Constructs a CommandException with a message and CommandExceptionType public CommandException(string message, CommandExceptionType exceptionType) : base(message) { type = exceptionType; }
public CommandException(CommandExceptionType type) : base(type.ToString()) { }
public CommandException(CommandExceptionType type, string message) : base($"{type} [{message}]") { }