org.zalando.riptide.faults.CausalChainClassificationStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of riptide-faults Show documentation
Show all versions of riptide-faults Show documentation
Client side response routing
package org.zalando.riptide.faults;
import com.google.common.base.Throwables;
import java.util.function.Predicate;
public final class CausalChainClassificationStrategy implements ClassificationStrategy {
@Override
@SuppressWarnings("UnstableApiUsage")
public boolean test(final Throwable throwable, final Predicate predicate) {
return Throwables.getCausalChain(throwable).stream().anyMatch(predicate);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy