
com.github.mkopylec.charon.forwarding.RequestForwardingException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of charon-spring-webmvc Show documentation
Show all versions of charon-spring-webmvc Show documentation
Reverse proxy implementation in form of Spring Boot starter
The newest version!
package com.github.mkopylec.charon.forwarding;
import java.util.function.Supplier;
public class RequestForwardingException extends RuntimeException {
private RequestForwardingException(String message) {
super(message);
}
private RequestForwardingException(String message, Throwable cause) {
super(message, cause);
}
public static void requestForwardingErrorIf(boolean condition, Supplier errorMessage) {
if (condition) {
throw new RequestForwardingException(errorMessage.get());
}
}
public static RequestForwardingException requestForwardingError(String errorMessage) {
return new RequestForwardingException(errorMessage);
}
public static RequestForwardingException requestForwardingError(String errorMessage, Throwable cause) {
return new RequestForwardingException(errorMessage, cause);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy