public class MimeMailException
extends com.openexchange.exception.OXException
OXException
- For MIME related errors.
Taken from OXException
:
The detail number range in subclasses generated in mail bundles is supposed to start with 2000 and may go up to 2999.
The detail number range in subclasses generated in transport bundles is supposed to start with 3000 and may go up to 3999.
CATEGORY_CAPACITY, CATEGORY_CONFIGURATION, CATEGORY_CONFLICT, CATEGORY_CONNECTIVITY, CATEGORY_ERROR, CATEGORY_PERMISSION_DENIED, CATEGORY_SERVICE_DOWN, CATEGORY_TRUNCATED, CATEGORY_TRY_AGAIN, CATEGORY_USER_INPUT, CATEGORY_WARNING, CODE_DEFAULT, EMPTY_MSG, MESSAGE_ARGS_EMPTY, PREFIX_GENERAL, PROPERTY_AUTH_ID, PROPERTY_CLIENT, PROPERTY_CONTEXT, PROPERTY_LOCALE, PROPERTY_LOGIN, PROPERTY_REQUEST, PROPERTY_REQUEST_BODY, PROPERTY_RESPONSE, PROPERTY_SESSION, PROPERTY_USER
Constructor and Description |
---|
MimeMailException(int code,
java.lang.String displayMessage,
java.lang.Object... displayArgs)
Initializes a new
MimeMailException . |
MimeMailException(int code,
java.lang.String displayMessage,
java.lang.Throwable cause,
java.lang.Object... displayArgs)
Initializes a new
MimeMailException . |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
appendInfo(java.lang.String info,
javax.mail.Folder folder)
Appends command information to given information string.
|
static com.openexchange.exception.OXException |
handleMessagingException(javax.mail.MessagingException e)
Handles given instance of
MessagingException and creates an appropriate instance of OXException
This is just a convenience method that simply invokes handleMessagingException(MessagingException, MailConfig) with the
latter parameter set to null . |
static com.openexchange.exception.OXException |
handleMessagingException(javax.mail.MessagingException e,
MailConfig mailConfig)
Handles given instance of
MessagingException and creates an appropriate instance of OXException |
static com.openexchange.exception.OXException |
handleMessagingException(javax.mail.MessagingException e,
MailConfig mailConfig,
com.openexchange.session.Session session)
Handles given instance of
MessagingException and creates an appropriate instance of OXException |
static com.openexchange.exception.OXException |
handleMessagingException(javax.mail.MessagingException e,
MailConfig mailConfig,
com.openexchange.session.Session session,
javax.mail.Folder folder)
Handles given instance of
MessagingException and creates an appropriate instance of OXException |
static boolean |
isInUseException(javax.mail.MessagingException e)
Checks for possible in-use error.
|
static boolean |
isInUseException(java.lang.String msg)
Checks for possible in-use error.
|
static boolean |
isOverQuotaException(javax.mail.MessagingException e)
Checks for possible over-quota error.
|
static boolean |
isOverQuotaException(java.lang.String msg)
Checks for possible over-quota error.
|
addCategory, addProblematic, addTruncatedId, conflict, containsProperty, copyFrom, fillInStackTrace, general, general, getCategories, getCategory, getCode, getDisplayArgs, getDisplayMessage, getErrorCode, getExceptionId, getGeneric, getLogArgs, getLogMessage, getLogMessage, getLogMessage, getMessage, getPlainLogMessage, getPrefix, getProblematics, getProperty, getPropertyNames, getServerId, getSoleMessage, isConflict, isGeneric, isLoggable, isMandatory, isNoPermission, isNotFound, isPrefix, log, mandatoryField, mandatoryField, markLightWeight, noPermissionForFolder, noPermissionForModule, notFound, remove, removeCategory, setCategory, setDisplayMessage, setExceptionId, setGeneric, setLogMessage, setLogMessage, setPrefix, setProperty, setSessionProperties, similarTo, similarTo, sortCategories, toString
public MimeMailException(int code, java.lang.String displayMessage, java.lang.Object... displayArgs)
MimeMailException
.code
- displayMessage
- displayArgs
- public MimeMailException(int code, java.lang.String displayMessage, java.lang.Throwable cause, java.lang.Object... displayArgs)
MimeMailException
.code
- displayMessage
- cause
- displayArgs
- public static com.openexchange.exception.OXException handleMessagingException(javax.mail.MessagingException e)
MessagingException
and creates an appropriate instance of OXException
This is just a convenience method that simply invokes handleMessagingException(MessagingException, MailConfig)
with the
latter parameter set to null
.
e
- The messaging exceptionOXException
public static com.openexchange.exception.OXException handleMessagingException(javax.mail.MessagingException e, MailConfig mailConfig)
MessagingException
and creates an appropriate instance of OXException
e
- The messaging exceptionmailConfig
- The corresponding mail configuration used to add information like mail server etc.OXException
public static com.openexchange.exception.OXException handleMessagingException(javax.mail.MessagingException e, MailConfig mailConfig, com.openexchange.session.Session session)
MessagingException
and creates an appropriate instance of OXException
e
- The messaging exceptionmailConfig
- The corresponding mail configuration used to add information like mail server etc.session
- The session providing user informationOXException
public static com.openexchange.exception.OXException handleMessagingException(javax.mail.MessagingException e, MailConfig mailConfig, com.openexchange.session.Session session, javax.mail.Folder folder)
MessagingException
and creates an appropriate instance of OXException
e
- The messaging exceptionmailConfig
- The corresponding mail configuration used to add information like mail server etc.session
- The session providing user informationfolder
- The optional folderOXException
public static java.lang.String appendInfo(java.lang.String info, javax.mail.Folder folder)
info
- The informationfolder
- The optional folderpublic static boolean isOverQuotaException(javax.mail.MessagingException e)
public static boolean isOverQuotaException(java.lang.String msg)
public static boolean isInUseException(javax.mail.MessagingException e)
public static boolean isInUseException(java.lang.String msg)