static public string GetErrorHelpText(ScutStudentLoginError error) { switch (error) { case ScutStudentLoginError.AccountNotExist: return("账户不存在"); case ScutStudentLoginError.UserNameOrPasswordIncorrect: return("用户名或密码不正确"); case ScutStudentLoginError.TimePeriodProhibited: return("此时段禁止登录"); case ScutStudentLoginError.UsersMoreThanLimit: return("用户数量超过限制"); case ScutStudentLoginError.Unknown: default: return("未知错误"); } }
public ScutStudentLoginException(ScutStudentLoginError error, Exception inner) : base(ScutStudentLoginErrorHelper.GetErrorHelpText(error), inner) { }