Newer
Older
sendgrid-api / src / main / java / io / ljunggren / sendgrid / api / exception / SendgridException.java
package io.ljunggren.sendgrid.api.exception;

/**
 * Checked exception thrown by the SendGrid API client to wrap
 * any error originating from the SendGrid service or the
 * underlying HTTP/IO layer.
 */
public class SendgridException extends Exception {

	private static final long serialVersionUID = -2630051469419822905L;

	/**
	 * Create a new exception with a descriptive message.
	 *
	 * @param message human readable description of the failure
	 */
	public SendgridException(String message) {
		super(message);
	}

	/**
	 * Create a new exception that wraps an underlying cause.
	 *
	 * @param cause the original exception that triggered this failure
	 */
	public SendgridException(Throwable cause) {
		super(cause);
	}

	/**
	 * Create a new exception with a descriptive message and an
	 * underlying cause.
	 *
	 * @param message human readable description of the failure
	 * @param cause   the original exception that triggered this failure
	 */
	public SendgridException(String message, Throwable cause) {
		super(message, cause);
	}

}