| 1 | package fr.sii.ogham.email.sendgrid.sender.exception; | |
| 2 | ||
| 3 | import static fr.sii.ogham.core.CoreConstants.SERIAL_VERSION_UID; | |
| 4 | ||
| 5 | import fr.sii.ogham.email.attachment.Attachment; | |
| 6 | ||
| 7 | /** | |
| 8 | * Specific exception for SendGrid that indicates that an attachment is not | |
| 9 | * readable or doesn't exist. | |
| 10 | * | |
| 11 | * @author Aurélien Baudet | |
| 12 | * | |
| 13 | */ | |
| 14 | public class AttachmentReadException extends SendGridException { | |
| 15 | private static final long serialVersionUID = SERIAL_VERSION_UID; | |
| 16 | ||
| 17 | private final transient Attachment attachment; | |
| 18 | ||
| 19 | public AttachmentReadException(String message, Attachment attachment, Throwable cause) { | |
| 20 | super(message, cause); | |
| 21 | this.attachment = attachment; | |
| 22 | } | |
| 23 | ||
| 24 | public AttachmentReadException(String message, Attachment attachment) { | |
| 25 | super(message); | |
| 26 | this.attachment = attachment; | |
| 27 | } | |
| 28 | ||
| 29 | public AttachmentReadException(Throwable cause, Attachment attachment) { | |
| 30 | super(cause); | |
| 31 | this.attachment = attachment; | |
| 32 | } | |
| 33 | ||
| 34 | public Attachment getAttachment() { | |
| 35 |
1
1. getAttachment : replaced return value with null for fr/sii/ogham/email/sendgrid/sender/exception/AttachmentReadException::getAttachment → NO_COVERAGE |
return attachment; |
| 36 | } | |
| 37 | } | |
Mutations | ||
| 35 |
1.1 |