添加异常

release
路明慧 2 years ago
parent 27c15d8c1f
commit e8dca0ba2f
  1. 5
      dxhy-core/src/main/java/com/dxhy/core/task/SnEmailGatherTask.java

@ -26,6 +26,7 @@ import com.github.pagehelper.util.StringUtil;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.sun.mail.pop3.POP3Folder;
import com.sun.mail.util.MailConnectException;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
@ -392,6 +393,10 @@ public class SnEmailGatherTask {
buildMsg(gatherLogVo,"1","密码错误连接邮箱失败");
e.printStackTrace();
log.error("连接邮箱异常信息{}",e);
}catch(MailConnectException e){
buildMsg(gatherLogVo,"1","连接超时");
e.printStackTrace();
log.error("连接邮箱异常信息{}",e);
} catch (Exception e) {
buildMsg(gatherLogVo,"1","未知连接异常");
e.printStackTrace();

Loading…
Cancel
Save