io.polyglotted.elastic.index.ValidateException Maven / Gradle / Ivy
package io.polyglotted.elastic.index;
@SuppressWarnings({"serial", "WeakerAccess"})
public class ValidateException extends RuntimeException {
public final int status;
public ValidateException(int status, String message) { super(message); this.status = status; }
public static T validateNotNull(T object, String message) {
if (object == null) { throw new ValidateException(404, message); }
return object;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy