
fi.evolver.basics.spring.http.exception.HttpInternalServerErrorException Maven / Gradle / Ivy
package fi.evolver.basics.spring.http.exception;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;
import fi.evolver.utils.format.FormatUtils;
@ResponseStatus(code = HttpStatus.INTERNAL_SERVER_ERROR)
public class HttpInternalServerErrorException extends RuntimeException {
private static final long serialVersionUID = 1L;
public HttpInternalServerErrorException(String message, Object... args) {
super(FormatUtils.format(message, args));
}
public HttpInternalServerErrorException(Throwable cause, String message, Object... args) {
this("%s: %s", FormatUtils.format(message, args), cause);
}
public HttpInternalServerErrorException(Throwable cause) {
this(cause, "Internal server error");
}
@Override
public String toString() {
return getMessage();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy