tech.ydb.yoj.databind.schema.BindingException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of yoj-databind Show documentation
Show all versions of yoj-databind Show documentation
Core data-binding logic used by YOJ (YDB ORM for Java) to convert
between Java objects and database rows (or anything representable by
a Java Map, really).
The newest version!
package tech.ydb.yoj.databind.schema;
import lombok.NonNull;
import javax.annotation.Nullable;
import java.lang.reflect.InvocationTargetException;
import java.util.function.Function;
public abstract class BindingException extends IllegalArgumentException {
protected BindingException(@Nullable Throwable cause, @NonNull Function msgFunc) {
super(msgFunc.apply(rootCause(cause)), rootCause(cause));
}
private static Throwable rootCause(Throwable cause) {
return cause instanceof InvocationTargetException ? cause.getCause() : cause;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy