com.gitee.cliveyuan.tools.exception.EmailException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-tools Show documentation
Show all versions of java-tools Show documentation
Some commonly used methods in java
package com.gitee.cliveyuan.tools.exception;
/**
* 邮件异常
*
* @author clive
* Created on 2018/07/23
* @since 1.0
*/
public class EmailException extends BaseException {
public EmailException(int code, String message) {
super(code, message);
}
public static EmailException connectFail(String message) {
return new EmailException(1000, message);
}
public static EmailException authFail() {
return new EmailException(1001, "account or password is wrong of email sender");
}
public static EmailException invalidAddress() {
return new EmailException(1002, "Invalid Addresses");
}
public static EmailException unKnowError() {
return new EmailException(1003, "UnKnow Error");
}
}