- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- javax.mail.MessagingException
-
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- AuthenticationFailedException, FolderClosedException, FolderNotFoundException, IllegalWriteException, MessageRemovedException, MethodNotSupportedException, NoSuchProviderException, ParseException, ReadOnlyFolderException, SearchException, SendFailedException, StoreClosedException
public class MessagingException extends Exception
The base class for all exceptions thrown by the Messaging classes- Author:
- John Mani, Bill Shannon
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description MessagingException()
Constructs a MessagingException with no detail message.MessagingException(String s)
Constructs a MessagingException with the specified detail message.MessagingException(String s, Exception e)
Constructs a MessagingException with the specified Exception and detail message.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Throwable
getCause()
Overrides thegetCause
method ofThrowable
to return the next exception in the chain of nested exceptions.Exception
getNextException()
Get the next exception chained to this one.boolean
setNextException(Exception ex)
Add an exception to the end of the chain.String
toString()
Override toString method to provide information on nested exceptions.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Constructor Detail
-
MessagingException
public MessagingException()
Constructs a MessagingException with no detail message.
-
MessagingException
public MessagingException(String s)
Constructs a MessagingException with the specified detail message.- Parameters:
s
- the detail message
-
MessagingException
public MessagingException(String s, Exception e)
Constructs a MessagingException with the specified Exception and detail message. The specified exception is chained to this exception.- Parameters:
s
- the detail messagee
- the embedded exception- See Also:
getNextException()
,setNextException(java.lang.Exception)
,getCause()
-
-
Method Detail
-
getNextException
public Exception getNextException()
Get the next exception chained to this one. If the next exception is a MessagingException, the chain may extend further.- Returns:
- next Exception, null if none.
-
getCause
public Throwable getCause()
Overrides thegetCause
method ofThrowable
to return the next exception in the chain of nested exceptions.
-
setNextException
public boolean setNextException(Exception ex)
Add an exception to the end of the chain. If the end is not a MessagingException, this exception cannot be added to the end.- Parameters:
ex
- the new end of the Exception chain- Returns:
true
if this Exception was added,false
otherwise.
-
-
Traduction non disponible
Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Version en cache
21/08/2025 17:18:18 Cette version de la page est en cache (à la date du 21/08/2025 17:18:18) afin d'accélérer le traitement.Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la version plus récente de la page.
Document créé le 14/04/2008, dernière modification le 18/08/2025
Source du document imprimé : https://www.gaudry.be/java-api-javaee-rf-javax/mail/messagingexception.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.