List of usage examples for javax.mail FolderNotFoundException printStackTrace
public void printStackTrace()
From source file:org.xwiki.contrib.mail.internal.AbstractMailStore.java
/** * {@inheritDoc}//from w w w . j ava 2 s. c o m * * @see org.xwiki.contrib.mail.IMailReader#check(java.lang.String, boolean) */ @Override public int check(String folder, boolean onlyUnread) { List<Message> messages = null; File storePath = new File(getMailSource().getLocation()); if (!storePath.exists() || !storePath.canRead()) { return SourceConnectionErrors.CONNECTION_ERROR.getCode(); } try { messages = read(folder, onlyUnread); } catch (FolderNotFoundException e) { return SourceConnectionErrors.FOLDER_NOT_FOUND.getCode(); } catch (MessagingException e) { // TODO Very basic implementation of check() ... e.printStackTrace(); return SourceConnectionErrors.UNEXPECTED_EXCEPTION.getCode(); } return messages == null ? -1 : messages.size(); }