com.openexchange.mail.mime
Class MIMEMailException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.openexchange.groupware.AbstractOXException
              extended by com.openexchange.mail.MailException
                  extended by com.openexchange.mail.mime.MIMEMailException
All Implemented Interfaces:
java.io.Serializable

public class MIMEMailException
extends MailException

MIMEMailException - For MIME related errors.

Taken from MailException:

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.

Author:
Thorben Betten
See Also:
Serialized Form

Nested Class Summary
static class MIMEMailException.Code
           
 
Nested classes/interfaces inherited from class com.openexchange.groupware.AbstractOXException
com.openexchange.groupware.AbstractOXException.Category, com.openexchange.groupware.AbstractOXException.Parsing, com.openexchange.groupware.AbstractOXException.ProblematicAttribute, com.openexchange.groupware.AbstractOXException.Truncated
 
Field Summary
 
Fields inherited from class com.openexchange.groupware.AbstractOXException
DF, SERVER_ID
 
Constructor Summary
MIMEMailException(com.openexchange.groupware.AbstractOXException cause)
           
MIMEMailException(com.openexchange.groupware.Component component, com.openexchange.groupware.AbstractOXException.Category category, int detailNumber, java.lang.String message, java.lang.Throwable cause)
           
MIMEMailException(MIMEMailException.Code code)
           
MIMEMailException(MIMEMailException.Code code, java.lang.Object... messageArgs)
           
MIMEMailException(MIMEMailException.Code code, java.lang.Throwable cause, java.lang.Object... messageArgs)
           
 
Method Summary
static MIMEMailException handleMessagingException(javax.mail.MessagingException e)
          Handles given instance of MessagingException and creates an appropriate instance of MIMEMailException This is just a convenience method that simply invokes handleMessagingException(MessagingException, MailConfig) with the latter parameter set to null.
static MIMEMailException handleMessagingException(javax.mail.MessagingException e, MailConfig mailConfig)
          Handles given instance of MessagingException and creates an appropriate instance of MIMEMailException
static MIMEMailException handleMessagingException(javax.mail.MessagingException e, MailConfig mailConfig, com.openexchange.session.Session session)
          Handles given instance of MessagingException and creates an appropriate instance of MIMEMailException
 
Methods inherited from class com.openexchange.groupware.AbstractOXException
addProblematic, addTruncatedId, getCategory, getComponent, getDetailNumber, getErrorCode, getExceptionID, getLocale, getMessage, getMessageArgs, getOrigMessage, getProblematics, overrideExceptionID, setCategory, setComponent, setDetail, setDetailNumber, setLocale, setMessageArgs, toString
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MIMEMailException

public MIMEMailException(com.openexchange.groupware.AbstractOXException cause)

MIMEMailException

public MIMEMailException(MIMEMailException.Code code,
                         java.lang.Object... messageArgs)

MIMEMailException

public MIMEMailException(MIMEMailException.Code code,
                         java.lang.Throwable cause,
                         java.lang.Object... messageArgs)

MIMEMailException

public MIMEMailException(MIMEMailException.Code code)

MIMEMailException

public MIMEMailException(com.openexchange.groupware.Component component,
                         com.openexchange.groupware.AbstractOXException.Category category,
                         int detailNumber,
                         java.lang.String message,
                         java.lang.Throwable cause)
Method Detail

handleMessagingException

public static MIMEMailException handleMessagingException(javax.mail.MessagingException e)
Handles given instance of MessagingException and creates an appropriate instance of MIMEMailException

This is just a convenience method that simply invokes handleMessagingException(MessagingException, MailConfig) with the latter parameter set to null.

Parameters:
e - The messaging exception
Returns:
An appropriate instance of MIMEMailException

handleMessagingException

public static MIMEMailException handleMessagingException(javax.mail.MessagingException e,
                                                         MailConfig mailConfig)
Handles given instance of MessagingException and creates an appropriate instance of MIMEMailException

Parameters:
e - The messaging exception
mailConfig - The corresponding mail configuration used to add information like mail server etc.
Returns:
An appropriate instance of MIMEMailException

handleMessagingException

public static MIMEMailException handleMessagingException(javax.mail.MessagingException e,
                                                         MailConfig mailConfig,
                                                         com.openexchange.session.Session session)
Handles given instance of MessagingException and creates an appropriate instance of MIMEMailException

Parameters:
e - The messaging exception
mailConfig - The corresponding mail configuration used to add information like mail server etc.
session - The session providing user information
Returns:
An appropriate instance of MIMEMailException