All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mailosaur.MailosaurException Maven / Gradle / Ivy

There is a newer version: 8.1.0
Show newest version
package com.mailosaur;

/**
 * Exception thrown for an invalid response.
 */
public class MailosaurException extends Exception {
	private static final long serialVersionUID = 2L;

	public MailosaurException(String message, String errorType) {
		super(message);
		this.errorType = errorType;
	}

	public MailosaurException(String message, String errorType, Integer httpStatusCode, String httpResponseBody) {
		super(message);
		this.errorType = errorType;
		this.httpStatusCode = httpStatusCode;
		this.httpResponseBody = httpResponseBody;
    }

	public MailosaurException(Throwable cause) {
		super(cause);
		this.errorType = "client_error";
	}

    private final String errorType;
	private Integer httpStatusCode = null;
	private String httpResponseBody = null;

	public String errorType() { return this.errorType; }
	public Integer httpStatusCode() { return this.httpStatusCode; }
	public String httpResponseBody() { return this.httpResponseBody; }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy