org.xbib.helianthus.common.util.CompletionActions Maven / Gradle / Ivy
package org.xbib.helianthus.common.util;
import java.util.logging.Level;
import java.util.logging.Logger;
public final class CompletionActions {
private static final Logger logger = Logger.getLogger(CompletionActions.class.getName());
private CompletionActions() {
}
/**
* Logs the specified {@link Throwable}. For example:
* {@code
* CompletableFuture> f = ...;
* f.exceptionally(CompletionActions::log);
* }
*
* @return {@code null}
*/
public static T log(Throwable cause) {
logger.log(Level.WARNING, "Unexpected exception from a completion action:", cause);
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy