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

com.softicar.platform.common.network.http.error.HttpError Maven / Gradle / Ivy

Go to download

The SoftiCAR Platform is a lightweight, Java-based library to create interactive business web applications.

There is a newer version: 50.0.0
Show newest version
package com.softicar.platform.common.network.http.error;

import com.softicar.platform.common.network.http.HttpStatusCode;

/**
 * An HTTP error.
 *
 * @author Oliver Richers
 */
public class HttpError extends RuntimeException {

	private final HttpStatusCode statusCode;

	public HttpError(HttpStatusCode statusCode, String message, Object...arguments) {

		this(statusCode, null, message, arguments);
	}

	public HttpError(HttpStatusCode statusCode, Throwable cause, String message, Object...arguments) {

		super(String.format(message, arguments), cause);

		this.statusCode = statusCode;
	}

	/**
	 * Returns the {@link HttpStatusCode}.
	 *
	 * @return the {@link HttpStatusCode} (never null)
	 */
	public HttpStatusCode getStatusCode() {

		return statusCode;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy