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

com.thehellings.gully.handlers.Error500 Maven / Gradle / Ivy

There is a newer version: 0.6
Show newest version
package com.thehellings.gully.handlers;

import com.thehellings.gully.http.ResponseCode;
import io.undertow.server.HttpHandler;
import io.undertow.server.HttpServerExchange;

public class Error500 implements HttpHandler {
	public boolean displayBacktrace;

	public Error500() {
		this(false);
	}

	public Error500(boolean displayBacktrace) {
		this.displayBacktrace = displayBacktrace;
	}

	@Override
	public void handleRequest(HttpServerExchange exchange) {
		exchange.setStatusCode(ResponseCode.SERVER_ERROR.getCode());
		exchange.getResponseSender().send("Error occurred during excution.");
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy