fr.sii.ogham.email.sendgrid.sender.exception.AttachmentReadException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ogham-email-sendgrid-common Show documentation
Show all versions of ogham-email-sendgrid-common Show documentation
Common classes for all SendGrid implementation for Ogham
The newest version!
package fr.sii.ogham.email.sendgrid.sender.exception;
import static fr.sii.ogham.core.CoreConstants.SERIAL_VERSION_UID;
import fr.sii.ogham.email.attachment.Attachment;
/**
* Specific exception for SendGrid that indicates that an attachment is not
* readable or doesn't exist.
*
* @author Aurélien Baudet
*
*/
public class AttachmentReadException extends SendGridException {
private static final long serialVersionUID = SERIAL_VERSION_UID;
private final transient Attachment attachment;
public AttachmentReadException(String message, Attachment attachment, Throwable cause) {
super(message, cause);
this.attachment = attachment;
}
public AttachmentReadException(String message, Attachment attachment) {
super(message);
this.attachment = attachment;
}
public AttachmentReadException(Throwable cause, Attachment attachment) {
super(cause);
this.attachment = attachment;
}
public Attachment getAttachment() {
return attachment;
}
}