1 | package fr.sii.ogham.email.exception.handler; | |
2 | ||
3 | import static fr.sii.ogham.core.CoreConstants.SERIAL_VERSION_UID; | |
4 | ||
5 | import fr.sii.ogham.core.exception.MessagingException; | |
6 | import fr.sii.ogham.core.message.content.Content; | |
7 | ||
8 | /** | |
9 | * Thrown when the content of the message can't be handled. This exception | |
10 | * carries the original content that couldn't be handled. | |
11 | * | |
12 | * This is a general exception and it has subclasses to identify the reason. | |
13 | * | |
14 | * @author Aurélien Baudet | |
15 | * | |
16 | * @see NoContentHandlerException | |
17 | */ | |
18 | public class ContentHandlerException extends MessagingException { | |
19 | private static final long serialVersionUID = SERIAL_VERSION_UID; | |
20 | ||
21 | private final transient Content content; | |
22 | ||
23 | public ContentHandlerException(String message, Content content, Throwable cause) { | |
24 | super(message, cause); | |
25 | this.content = content; | |
26 | } | |
27 | ||
28 | public ContentHandlerException(String message, Content content) { | |
29 | super(message); | |
30 | this.content = content; | |
31 | } | |
32 | ||
33 | public ContentHandlerException(Throwable cause, Content content) { | |
34 | super(cause); | |
35 | this.content = content; | |
36 | } | |
37 | ||
38 | public Content getContent() { | |
39 |
1
1. getContent : replaced return value with null for fr/sii/ogham/email/exception/handler/ContentHandlerException::getContent → NO_COVERAGE |
return content; |
40 | } | |
41 | } | |
Mutations | ||
39 |
1.1 |