|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException org.springframework.core.NestedRuntimeException org.springframework.mail.MailException org.springframework.mail.MailSendException
Exception thrown when a mail sending error is encountered. Can register failed messages with their exceptions.
Field Summary |
Fields inherited from class java.lang.RuntimeException |
|
Constructor Summary | |
MailSendException(Map failedMessages)
Constructor for registration of failed messages, with the messages that failed as keys, and the thrown exceptions as values. |
|
MailSendException(String msg)
Constructor for MailSendException. |
|
MailSendException(String msg,
Throwable ex)
Constructor for MailSendException. |
Method Summary | |
Map |
getFailedMessages()
Return a Map with the failed messages as keys, and the thrown exceptions as values. |
String |
getMessage()
Return the detail message, including the message from the nested exception if there is one. |
void |
printStackTrace(PrintStream ps)
Print the composite message and the embedded stack trace to the specified stream. |
void |
printStackTrace(PrintWriter pw)
Print the composite message and the embedded stack trace to the specified writer. |
Methods inherited from class org.springframework.core.NestedRuntimeException |
contains, getCause |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MailSendException(String msg)
msg
- messagepublic MailSendException(String msg, Throwable ex)
msg
- messageex
- root cause from remoting API in usepublic MailSendException(Map failedMessages)
The messages should be the same that were originally passed to the invoked send method.
Method Detail |
public Map getFailedMessages()
The messages will be the same that were originally passed to the invoked send method, i.e. SimpleMailMessages in case of using the generic MailSender interface.
In case of sending MimeMessage instances via JavaMailSender, the messages will be of type MimeMessage.
public String getMessage()
NestedRuntimeException
getMessage
in class NestedRuntimeException
public void printStackTrace(PrintStream ps)
NestedRuntimeException
printStackTrace
in class NestedRuntimeException
ps
- the print streampublic void printStackTrace(PrintWriter pw)
NestedRuntimeException
printStackTrace
in class NestedRuntimeException
pw
- the print writer
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |